Components
Tooltip
A short hint on hover or focus. It explains an icon or adds a shortcut; it never carries the only description of a control.
Usage
A short hint that names an icon or shows a shortcut.
Do and don't
- Do. Keep the control's accessible name even when a tooltip is present.
- Don't. Put links or validation text inside the bubble.
Composition
Wrap an app region in TooltipProvider for shared timing, and a toolbar in TooltipGroup so adjacent hints open instantly after the first. Each Tooltip takes one child element and a content node. TooltipShortcut draws the key cap; TooltipPortalContainer scopes a bubble to a bounded surface.
Props
Tooltip:content,shortcut,side,sideOffset,delayDuration,forceOpen,followCursor,hoverable,onOpenChange.TooltipProvider/TooltipGroup:delayDuration(default 200ms) andskipDelayDuration(default 300ms).
Behavior and states
The first tooltip waits for the hover delay; neighbours in a group skip it, so a toolbar feels immediate once one is open. The bubble opens on focus as well as hover. forceOpen is for composed cases such as a breadcrumb whose label is clipped; leave it undefined for normal use. A bubble stays open while the pointer is over it unless hoverable is false.
Accessibility
A tooltip is supplementary. Icon-only controls still need aria-label, and visible text must not depend on the bubble. Keep content short and non-interactive; use a popover or dialog when the user must click something inside. The shortcut cap is visual only, so the real key handling belongs to the control.
Responsive
The bubble flips between top, right, bottom and leftaccording to available space. On touch layouts, keep the control's label visible: hover hints are not the primary channel there.
Related
Button is the usual trigger, Breadcrumb uses tooltips for clipped labels, and Motion & Transitions explains the short delay and restrained entrance.