Tooltip
A short label revealed on hover or keyboard focus.
Tooltip names a control whose purpose is not obvious from its face — most often an icon-only button. It is supplementary: anything the reader must have cannot live here, because pointer users see it late and touch users never see it.
TooltipTrigger takes exactly two children: the control, then the tooltip.
Placement
Top
<TooltipTrigger delay={0}>
<Button variant="outline">Top</Button>
<Tooltip placement="top">Above the trigger</Tooltip>
</TooltipTrigger>Right
<TooltipTrigger delay={0}>
<Button variant="outline">Right</Button>
<Tooltip placement="right">Beside the trigger</Tooltip>
</TooltipTrigger>Bottom
<TooltipTrigger delay={0}>
<Button variant="outline">Bottom</Button>
<Tooltip placement="bottom">Below the trigger</Tooltip>
</TooltipTrigger>placement defaults to top and flips automatically when there is no room, so
treat it as a preference rather than a guarantee.
Delay
delay defaults to 1500ms — long enough that tooltips do not flicker as the
pointer crosses a toolbar. Lower it only when the tooltip is the sole label for
a control and the reader is likely to need it immediately.
closeDelay defaults to 0. Raise it when adjacent triggers should feel like
one group rather than flashing between labels.
When to use
Use Tooltip to name a control whose purpose is not obvious from its face — most often an icon-only button.
Use something else when:
- The reader must have the information. Put it on the page, like a Text Field description.
- The content has links or controls. Use Popover.
Usage
Do
Keep it to a few words naming the control. A tooltip is a label, not a paragraph.
Don't
Put required information, links, or interactive content inside. The tooltip dismisses on pointer-out and cannot be reached with a pointer or a screen reader's cursor.
Props
Tooltip
| Prop | Type | Default |
|---|---|---|
arrowBoundaryOffsetThe minimum distance the arrow's edge should be from the edge of the overlay element. | Typenumber | Default0 |
classNameThe CSS [className](https://developer.mozilla.org/en-US/docs/Web/API/Element/className) for the | TypeClassNameOrFunction<TooltipRenderProps> | Default— |
containerPaddingThe placement padding that should be applied between the element and its | Typenumber | Default12 |
crossOffsetThe additional offset applied along the cross axis between the element and its | Typenumber | Default0 |
defaultOpenWhether the overlay is open by default (uncontrolled). | Typeboolean | Default— |
isEnteringWhether the tooltip is currently performing an entry animation. | Typeboolean | Default— |
isExitingWhether the tooltip is currently performing an exit animation. | Typeboolean | Default— |
isOpenWhether the element is rendered. | Typeboolean | Default— |
offsetThe additional offset applied along the main axis between the element and its | Typenumber | Default8 |
placementThe placement of the tooltip with respect to the trigger. | Typeenum | Default'top' |
shouldFlipWhether the element should flip its orientation (e.g. top to bottom or left to right) when | Typeboolean | Defaulttrue |
triggerRefThe ref for the element which the tooltip positions itself with respect to. | TypeRefObject<Element | null> | Default— |
UNSTABLE_portalContainerThe container element in which the overlay portal will be placed. This may have unknown | TypeElement | Defaultdocument.body |
TooltipTrigger
| Prop | Type | Default |
|---|---|---|
closeDelayThe delay time for the tooltip to close. [See | Typenumber | Default0 |
defaultOpenWhether the overlay is open by default (uncontrolled). | Typeboolean | Default— |
delayThe delay time for the tooltip to show up. [See | Typenumber | Default1500 |
isDisabledWhether the tooltip should be disabled, independent from the trigger. | Typeboolean | Default— |
isOpenWhether the overlay is open by default (controlled). | Typeboolean | Default— |
shouldCloseOnPressWhether the tooltip should close when the trigger is pressed. | Typeboolean | Defaulttrue |
triggerBy default, opens for both focus and hover. Can be made to open only for focus. | Type"hover" | "focus" | Default'hover' |
Accessibility
Tooltip wraps React Aria's Tooltip, which shows on keyboard focus as well as
hover and dismisses on Escape. It does not replace an accessible name: an
icon-only button still needs aria-label, because the tooltip is described
content, not the button's label.
The tooltip grows from its trigger and leaves with a shorter, smaller fade. When the reader prefers reduced motion, it appears and disappears without animating.