‮Skip to content‬
uiify

Tooltip

‮Tooltip that appears after a short hover or focus delay.‬

‮Browsers‬
Chrome 114+Firefox 125+Safari 17+
‮Tier‬
1
‮Bundle compressed‬
2.16 kB
‮Forced layout budget‬
0 ms
‮Axe budget‬
0
‮SSR compatible‬
‮Yes‬
‮Published contract‬
‮Test harness‬

‮Playground‬

Tooltip

Closed

Open

‮API‬

Tooltip.Provider

‮Prop‬‮Type‬‮Default‬‮Description‬
delayDurationnumber300‮Milliseconds to wait after pointer enter or focus before opening.‬
skipDelayDurationnumber300‮Milliseconds after one tooltip closes during which the next one opens immediately.‬
childrenReactNode—‮The Tooltip.Root instances that share these timings.‬

Tooltip.Root

‮Prop‬‮Type‬‮Default‬‮Description‬
openboolean—‮Controlled open state.‬
defaultOpenbooleanfalse‮Uncontrolled initial open state.‬
onOpenChangePopoverChangeHandler—‮Called with the next open state and the details of what caused the change.‬
idstring—‮Base id for the anchor and content; generated when omitted, so pass one when the markup must be stable.‬
childrenReactNode—‮The Trigger and Content parts.‬

Tooltip.Trigger

‮Prop‬‮Type‬‮Default‬‮Description‬
classNamestring—‮Class applied to the trigger element.‬
childrenReactNode—‮Content of the trigger element.‬
asElementType"button"‮Render a different element or component in place of the default tag.‬
renderReactElement | ((props, state) => ReactElement)—‮Replace the rendered element while keeping behavior and accessibility wiring.‬

Tooltip.Content

‮Prop‬‮Type‬‮Default‬‮Description‬
side"top" | "right" | "bottom" | "left""bottom"‮Side of the trigger the tooltip is anchored to.‬
align"start" | "center" | "end""center"‮Alignment of the tooltip along the chosen side.‬
classNamestring—‮Class applied to the tooltip surface.‬
childrenReactNode—‮Content of the tooltip.‬
asElementType"div"‮Render a different element or component in place of the default tag.‬
renderReactElement | ((props, state) => ReactElement)—‮Replace the rendered element while keeping behavior and accessibility wiring.‬

‮Keyboard‬

‮Key‬‮Action‬
Focus trigger‮Show after delay‬
Escape‮Dismiss‬
Blur‮Dismiss‬

‮Accessibility‬

‮Described-by association between trigger and tooltip content.‬

‮Styling hooks‬

data-state