ui

Tooltip

A popup that appears when an element is hovered or focused, showing a hint for sighted users. Built with Base UI and Tailwind CSS. Copy-paste ready.

API Reference

Installation

Usage

Grouped Tooltips

Wrap multiple tooltips in TooltipProvider so that once one becomes visible, adjacent tooltips appear instantly without the usual delay:

TooltipContent Props

  • side: Which side the tooltip opens from. Options: "top" (default), "bottom", "left", "right", "inline-start", "inline-end"
  • align: Alignment relative to the trigger. Options: "center" (default), "start", "end"
  • sideOffset: Gap in pixels between the trigger and tooltip. Default: 4

Examples

Grouped Tooltips

Wrap multiple tooltips in TooltipProvider so they appear instantly after the first one opens. Once any tooltip in the group is visible, adjacent ones skip the delay and show immediately.

Animated Tooltips

Create tooltips that smoothly transition between triggers using a shared handle. All triggers share a single popup — position, size, and content animate automatically as focus moves between them.

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

Placement

Use the side prop on TooltipContent to control which side of the trigger the tooltip appears on. Defaults to "top".

Info Icon

A common pattern for inline contextual help — an icon-only ghost button that reveals explanatory text on hover without cluttering the layout.

Rich Tooltip

Tooltips can contain structured content beyond a single string — badges, lists, and links are all valid. Keep rich tooltips concise so they supplement rather than replace a proper UI surface.

Keyboard Shortcut Toolbar

Each icon-only button in the toolbar shows its label and keyboard shortcut in a tooltip. Pairing TooltipProvider with Kbd components gives users a discoverable reference without permanent labels.

Avatar Stack

Stacked member avatars with per-avatar name and role tooltips. The overflow badge lists remaining members, and the dashed add button completes the assignment UI pattern.

Trend Metrics

Compact metric badges that reveal a current-vs-previous breakdown on hover. The tooltip surfaces the exact numbers behind the percentage change without expanding the card layout.

Color Palette Inspector

A brand palette swatch row where hovering each swatch reveals the color name and hex code. The mini swatch preview inside the tooltip reinforces the selection at a glance.

Copy to Clipboard

A credentials panel where each field has a copy icon button. The tooltip content switches from "Copy to clipboard" to "Copied!" for 2 seconds after the click — giving precise feedback without a toast notification.

Feature Gate

Pro-only toolbar buttons render at reduced opacity and show a rich upgrade tooltip with a feature description and a direct upgrade link. Free-tier buttons fall back to a plain label tooltip.

Form Validation Hints

Info icons next to field labels reveal format requirements on hover — username rules, password strength criteria, and email usage policy — without cluttering the form layout.

System Status Indicators

A status bar where colored dots represent live service health. Hovering any dot reveals the service name, current status, uptime percentage, and average latency.

Icon-only nav buttons with tooltips anchored to the right side, showing the destination label and a one-line description. The active item is highlighted so the icon alone conveys context.

Permissions Matrix

A role-by-resource access table where each cell icon (full / read / none) reveals a tooltip explaining what that access level means for that specific resource.

Deployment Pipeline

A linear pipeline view with step icons (done, running, pending) connected by lines. Hovering each step reveals its name, status, duration, and a one-line detail message.