Skip to main content

Overview

Delete item
Top (default)
Appears on the right
Tooltip shows brief text on hover or focus. Use it to clarify icon buttons, explain truncated content, or surface keyboard shortcuts. Tooltips auto-position to stay visible within the viewport.

Installation


Usage


Variants

Basic

Delete item

Placement

With Keyboard Shortcut

Save ⌘S

API Reference

Tooltip (Root)

boolean
Controlled open state.
(open: boolean) => void
Callback fired when the open state changes.
boolean
default:"false"
Uncontrolled default open state.
number
default:"400"
Hover delay before the tooltip appears (ms).

TooltipContent

string
default:"top"
Preferred placement. Values: top · bottom · left · right
number
default:"4"
Distance from the trigger in pixels.
string
default:"center"
Alignment along the placement axis. Values: start · center · end
string
default:"md"
Tooltip size. Values: sm · md
string
Additional Tailwind classes for custom overrides.

Accessibility

  • Tooltip content uses role="tooltip" with a unique id
  • The trigger has aria-describedby pointing to the tooltip id
  • Tooltip opens on hover AND keyboard focus — never only on hover
  • Pressing Escape dismisses the tooltip
  • Do not put interactive elements (links, buttons) inside tooltip content

Do’s & Don’ts

Do

  • Use Tooltip to label icon-only buttons
  • Keep tooltip text to one short sentence or a keyboard shortcut
  • Use side="bottom" for elements at the top of the viewport
  • Always make the tooltip trigger keyboard-focusable

Don't

  • Don’t put interactive elements (links, buttons) inside tooltips
  • Don’t use Tooltip to hide essential information — it must be discoverable
  • Don’t use Tooltip for mobile-only touch targets — hover doesn’t work on touch
  • Don’t add long paragraphs — use a Popover for rich content