Tooltip
Tooltip shows a short text label on hover or keyboard focus. It binds to the trigger through
aria-describedby, so a screen reader announces the label alongside the trigger's name.
What it is
A compound component for descriptive text attached to a control. It opens after openDelay on
hover or focus, closes after closeDelay when the pointer or focus leaves, and closes
immediately on Escape. Tooltip.Content renders into a Portal
with role="tooltip".
Tooltip holds text and only text. The moment the content needs a link or a button, the component is wrong — a hover affordance cannot be operated by keyboard or touch users. Reach for HoverCard or Popover instead.
Install
Anatomy
API
Tooltip.Root
Tooltip.Root
stablefunction Tooltip.Root(props: TooltipRootProps): JSX.Element
Milliseconds to wait before showing on hover or focus.
Milliseconds to wait before hiding — a small grace period for the cursor.
Where the tooltip sits relative to the trigger.
The Trigger and Content parts.
Tooltip.Trigger
Tooltip.Trigger
stablefunction Tooltip.Trigger(props: TooltipTriggerProps): JSX.Element
A single element. Tooltip clones it to attach hover and focus handlers and — while open — `aria-describedby`.
Tooltip.Content
Tooltip.Content
stablefunction Tooltip.Content(props: TooltipContentProps): JSX.Element | null
Pixel gap between the trigger and the tooltip.
Inline style for the tooltip — positioning is applied on top.
The tooltip text.
Accessibility
The tooltip binds to the trigger with aria-describedby while open, so its text is announced as
the trigger's description. Because the trigger must be focusable for the focus path to work, the
element inside Tooltip.Trigger should be a real button, link, or input — not a <div>.
A tooltip is supplementary. It can clarify a control, but it cannot be the only place a piece of
information lives — a touch user never sees it, and a screen-reader user hears it only as a
description. An icon-only button still needs its own aria-label; the tooltip repeats that name
for sighted pointer users, it does not replace it.
Examples
A label for an icon button:
A keyboard-shortcut hint: