Tooltip
Contextual information that appears on hover or focus
Preview
Installation
Usage
Examples
Detached Trigger
Use createTooltipHandle() to link a trigger outside the Tooltip component.
Controlled
Control the tooltip's open state externally using the open and onOpenChange props.
Animated Transitions
Animate the tooltip when switching between multiple triggers with different payloads.
API Reference
The Tooltip component is built on top of Base UI's Tooltip. All Base UI props are supported. The documentation below only covers custom props and modified defaults specific to our implementation.
For the complete Base UI API, see the Base UI Tooltip documentation.
Utilities
createTooltipHandle
Creates a handle that connects a tooltip to one or more external TooltipTrigger components. Useful when the triggers need to live outside the Tooltip — for example, when each row in a list has its own trigger but they all share one tooltip.
Passing data from the trigger to the tooltip
The handle accepts an optional <Payload> generic that types a value each trigger can pass along. The tooltip reads it through a render-prop child, so you can render different content per trigger without duplicating the tooltip markup.
Without the <User> generic, payload inside the render prop resolves to unknown.
Props
TooltipContent
Composed component for common tooltip layouts. Combines Tooltip.Portal, Tooltip.Positioner, and Tooltip.Popup. Optionally renders Tooltip.Arrow. Props are forwarded to the Positioner and Popup components.
Modified Defaults
Our implementation changes the following Base UI prop defaults:
- TooltipContent:
sideOffsetdefaults to8(Base UI defaults to0) - TooltipContent:
collisionPaddingdefaults to10(Base UI defaults to5)