Tooltip

A popup that appears when an element is hovered or focused, showing a hint for sighted users.

Usage

API Reference

Tooltip

Root component.

TooltipTrigger

Trigger element that shows the tooltip on hover/focus.

TooltipPopup

Popup container that displays the tooltip content. Also exported as TooltipContent.

TooltipProvider

Provider for grouping tooltips.

TooltipCreateHandle

Creates a handle for detached tooltip triggers. Returns a handle object to attach to multiple triggers for animated transitions.

Examples

Grouped Tooltips

To group multiple tooltips so they appear instantly after the first one is opened, wrap them in TooltipProvider. The grouping logic ensures that once a tooltip becomes visible, the adjacent tooltips will be shown instantly.

Animated Tooltips

You can create animated tooltips that smoothly transition between different triggers using detached triggers. This pattern allows multiple triggers to share a single tooltip popup, with automatic animations for position, size, and content changes.

To create detached triggers:

  1. Create a handle using TooltipCreateHandle
  2. Attach the same handle to multiple TooltipTrigger components
  3. Each trigger provides a payload prop containing the content component
  4. Use a single Tooltip component with the handle to render the popup