Browse the docs

Tooltip (JS)

Positioned tooltip on the tooltip primitive: flips to stay inside the viewport, opens after a delay on hover and instantly on keyboard focus, dismisses with Escape, and never opens on touch — the WCAG 1.4.13 boxes the CSS-only version can't tick.

The CSS-only Tooltip stays the zero-JS default for short labels with room around them; use this one near viewport edges or when the bubble must be dismissible.

This component needs the tooltip primitive — two ways to get it:

Props

PropValuesDefaultDescription
contentnoderequiredWhat the bubble says.
side"top", "bottom", "left", "right""top"Preferred side; flips when out of room.
delayms400Hover delay. Keyboard focus always opens instantly.
classNamestring""Applied to the bubble.

children must be a single focusable element with its own accessible name — the trigger behavior merges onto it and aria-describedby wires itself.

Notes

A tooltip is extra information: anything essential belongs in visible copy. For custom arrangements use the primitive directly: TooltipRoot, TooltipTrigger, TooltipContent.