Tooltip

Floating label that appears on hover or focus. Multiple anchor options.

Example

Props

NameTypeDefaultRequiredDescription
contentReactNodeRequiredTooltip content
anchorAnchor'top'NoPosition and alignment relative to trigger (e.g. top-center)
openbooleanNoControlled open state
maxWidthstringNoOverrides the default max-width (CSS value, e.g. "256px")
onOpenChange(open: boolean) => voidNoCalled when open state changes

Accessibility

  • role="tooltip" with unique ID
  • Trigger gets aria-describedby pointing to tooltip
  • Shows on focus and hover, hides on Escape

Related Tokens

--tooltip-surface--tooltip-on-surface--tooltip-border