Tooltip
Add a brief explanation to a page element.
Basic usage
Hover or keyboard focus shows the tooltip; Escape closes it. Keep content descriptive; use Popover for interactive content.
basic.tsx
Examples
Placement
Set the preferred position with placement; it adjusts when space is limited.
Top
Bottom
Left
Right
placements.tsx
Disabled tooltip
Tooltip's disabled only turns off the tooltip, not the button. A disabled button cannot receive focus; use a focusable wrapper to explain why it is disabled.
Default
Disabled tooltip
disabled.tsx
Controlled visibility
Manage visibility with open and onOpenChange. Without open, defaultOpen only sets the initial state.
controlled.tsx
API
Tooltip API
Configure hint content, placement and visibility behavior.
The trigger must forward its ref and events. Its existing aria-describedby is merged with the tooltip reference. See PopupOptions for shared popup options.