Tooltip
A popup that displays information related to an element when the element receives keyboard focus or the mouse hovers over it.
When to use
A Tooltip shows a short, non-interactive label when a control receives keyboard focus or a pointer hover. Reach for it to clarify the purpose of an icon-only button, surface a keyboard shortcut, or show a brief hint about a control. Do NOT put buttons, links, or form controls inside a Tooltip.
- Prefer
Popoverwhen the floating content needs buttons, links, inputs, or anything else focusable. - Prefer
HoverCardfor a sighted-only preview of content that already lives behind a link.
Mount TooltipProvider once at the app root when you want shared tooltip behavior, such as consistent delay and hover settings.
Layering and z-index
Tooltip.Content renders at Tailwind z-50, Mantle's float tier. When composed inside an open Dialog, AlertDialog, or Sheet, it portals into that overlay's positioner and paints above the overlay that owns it. Outside every overlay, it portals to document.body, below the overlay tier (z-60). When sibling floats share a container, the most recently mounted float paints on top.
Tooltip does not render a backdrop. Modal layers such as Dialog, Sheet, and AlertDialog do render backdrops, so stacking those layers compounds the dim and blur effect on the layers underneath.
Composition
Compose the parts of a Tooltip together to build your own:
Polymorphism
Tooltip.Trigger accepts asChild, which renders your single child in place of the default trigger element while keeping the tooltip's hover, focus, and dismissal behavior.
Tooltip.Trigger asChild is the standard way to use this component: wrap the element that should show the tooltip (a Button, an IconButton, a link, or any focusable control) so the trigger behavior attaches to it instead of nesting it inside an extra element. Remember that the trigger must be focusable for the tooltip to be reachable by keyboard.
Tooltip.Root is a state provider and renders no DOM, so it takes no asChild.
API Reference
TooltipProvider
Wraps your app to set shared global behavior for your tooltips, such as consistent delay and hover settings. Mount exactly one instance, preferably at the root of your app. A nested provider applies its own timing props to its subtree. It also tracks skipDelayDuration separately, so a pointer that moves from one provider's trigger to the other's waits the delay again.
Tooltip.Root
The root component that manages the open/closed state of the tooltip. Wrap your app in TooltipProvider when you want shared app-wide delay and hover settings.
Tooltip.Content renders at Tailwind z-50, Mantle's float tier. When composed inside an open Dialog, AlertDialog, or Sheet, it portals into that overlay's positioner and paints above the overlay that owns it. Outside every overlay, it portals to document.body, below the overlay tier (z-60). When sibling floats share a container, the most recently mounted float paints on top.
Tooltip.Trigger
The button that toggles the tooltip. By default, the Tooltip.Content will position itself against the trigger.
Tooltip.Content
The component that pops out when the tooltip is open.
Tooltip.Content renders at Tailwind z-50, Mantle's float tier. When composed inside an open Dialog, AlertDialog, or Sheet, it portals into that overlay's positioner and paints above the overlay that owns it. Outside every overlay, it portals to document.body, below the overlay tier (z-60). When sibling floats share a container, the most recently mounted float paints on top.
children render inside a <div data-slot="tooltip-label">. The arrow is a permanent element sibling, so without the wrapper a bare text body is never a lone child: a browser translation engine reparents that text node, and the removal React runs when the body changes shape or goes away throws. The wrapper is a <div> because a tooltip body is often a <p>, which a <span> may not contain. It is display: contents, so it adds no box and every child of your body stays a layout child of the surface. Browser translation covers the mechanism and the rules your own components need.