Skip to Content
ComponentsTooltip

Tooltip

A contextual popup that appears on hover or keyboard focus to provide supplementary information. Built on Base UI Tooltip  with built-in ARIA attributes and keyboard support.

Preview

Design

Examples

Side

Controls which side of the trigger the tooltip appears on. The tooltip automatically flips to the opposite side when there is not enough space.

ValueDefaultDescription
top✓Tooltip appears above the trigger
bottomTooltip appears below the trigger
leftTooltip appears to the left of the trigger
rightTooltip appears to the right of the trigger
Design

Arrow

Visible by default. Set showArrow={false} to hide it.

Not shown in the game theme, where the pixel-art aesthetic omits directional arrows.

Design

Rich content

content accepts any ReactNode, allowing arbitrary markup inside the tooltip.

Design

Disabled

Prevents the tooltip from rendering.

Design

TooltipProvider — grouped timing

Wrapping tooltips in TooltipProvider gives them a shared hover-delay timer. After the first tooltip opens, subsequent ones appear without delay. This pattern is common in toolbar implementations.

Set delay and closeDelay on the provider to control timing for all wrapped tooltips.

Design

Controlled

Pass open and onOpenChange to control visibility programmatically.

Design

Guidelines

When to use

Use Tooltip for supplementary information that is helpful but not required. Touch and keyboard users may not have access to tooltip content; do not rely on it for anything essential.

Use caseRecommended
Label an icon-only buttonTooltip
Show a keyboard shortcutTooltip
Provide field hintsTextField helperText
Confirm a destructive actionDialog
Show form validation errorsTextField status + helperText

Accessibility

  • The popup has role="tooltip" and is associated with its trigger element via ARIA automatically.
  • The tooltip opens on keyboard focus and closes on Escape.
  • Avoid placing interactive elements (links, buttons) inside the popup. Keyboard users cannot reach them.

Props

Tooltip

Props

Prop
Default
Type
content
—
ReactNode
children
—
ReactElement
side?
"top"
"top" | "bottom" | "left" | "right"
align?
"center"
"start" | "center" | "end"
showArrow?
true
boolean
open?
—
boolean
defaultOpen?
—
boolean
onOpenChange?
—
(open: boolean) => void
disabled?
false
boolean
className?
—
string

TooltipProvider

Props

Prop
Default
Type
children
—
ReactNode
delay?
—
number
closeDelay?
—
number
Last updated on