Skip to main content

Tooltip

A popup that displays informative text when hovering or focusing on a trigger element.

Basic Usage

Placement

Variants

Mobile behavior

Tooltips have no hover on touch devices, so v2 ships with four explicit mobile modes. Tooltip auto-picks the right mode based on what's being wrapped, but you can override with mobileVariant.

ModeInteractionAuto-default for
tapSingle tap toggles; auto-dismisses after mobileAutoDismiss msPlain text, icons, badges
longpressPress and hold 500ms; release dismisses<button>, <a> (so tap still fires the action)
inlineRenders content as helper text below the trigger<input>, <textarea>, <select> (so focus isn't fought)
hiddenNo mobile renderingDecorative tooltips
<Tooltip content="Saved automatically" mobileVariant="longpress">
<Button>Save</Button>
</Tooltip>

<Tooltip content="Required field" mobileVariant="inline">
<input type="email" />
</Tooltip>

Pair with mobileIndicator to add a subtle dotted underline on the trigger — useful for tap mode where users wouldn't otherwise know a tooltip exists.

<Tooltip content="Updated 2 minutes ago" mobileIndicator>
<span>Status</span>
</Tooltip>

Props

PropTypeDefaultDescription
contentReactNode-Content to display inside the tooltip
placement'top' | 'bottom' | 'left' | 'right''top'Placement relative to the trigger
variant'dark' | 'light''dark'Visual variant
delaynumber200Delay in milliseconds before showing
maxWidthnumber250Maximum width in pixels
mobileVariant'tap' | 'longpress' | 'inline' | 'hidden'auto-detected from triggerHow the tooltip behaves on touch devices
mobileAutoDismissnumber4000Auto-dismiss duration in tap mode (ms). Set 0 to disable.
mobileIndicatorbooleanfalseAdd a dotted-underline visual hint on the trigger
mobileMaxWidthnumber-Override maxWidth on mobile (defaults to maxWidth)
childrenReactElement-Trigger element
classNamestring-Additional CSS class name