Skip to Content
DocumentationTooltip

Tooltip

A popup that displays information related to an element when the element receives keyboard focus or the mouse hovers over it.

Examples

Basic

Side

API

Tooltip

PropertyTypeDefaultDescription
defaultOpenbooleanfalseThe open state of the tooltip when it is initially rendered. Use when you do not need to control its open state.
openboolean-The controlled open state of the tooltip. Must be used in conjunction with onOpenChange.
onOpenChange(open: boolean) => void-Event handler called when the open state of the tooltip changes.
delayDurationnumber700The duration from when the mouse enters a tooltip trigger until the tooltip opens.
disableHoverableContentbooleanfalseWhen true, trying to hover the content will result in the tooltip closing as the pointer leaves the trigger.

TooltipTrigger

PropertyTypeDefaultDescription
asChildbooleanfalseChange the default rendered element for the one passed as a child, merging their props and behavior.

TooltipContent

PropertyTypeDefaultDescription
asChildbooleanfalseChange the default rendered element for the one passed as a child, merging their props and behavior.
side”top” | “right” | “bottom” | “left""top”The preferred side of the trigger to render against when open.
sideOffsetnumber0The distance in pixels from the trigger.
align”start” | “center” | “end""center”The preferred alignment against the trigger. May change when collisions occur.
alignOffsetnumber0An offset in pixels from the “start” or “end” alignment options.
avoidCollisionsbooleantrueWhen true, overrides the side and align preferences to prevent collisions with boundary edges.
Last updated on