overlaysstable

Tooltip

Contextual labels with managed delay, positioning, and accessibility.

Documentation
Preview
Live
Placement
Options

Usage

Import the component and configure it with the same props used in the playground.

tsx

Examples

Common patterns and practical usage examples.

Basic

Contextual label for a trigger.

tsx

Placement

Alternative tooltip placement.

tsx

Disabled

Disabled tooltip behavior.

tsx

Without arrow

Omits the arrow when a simpler bubble is preferred.

tsx

API

Props available for the React Tooltip.

21 props

Tooltip

PropTypeDefaultDescription
childrenRequired
ReactNode-Compound tooltip children.
open
boolean-Controlled open state.
defaultOpen
boolean-Initial uncontrolled open state.
onOpenChange
((open: boolean) => void)-Called when the open state changes.
delay
number | Partial<import("@vellira-ui/types").TooltipDelay>-Open delay in milliseconds, or explicit open/close delays.
skipDelay
number-Delay window for future sibling tooltip delay skipping.
offset
number-Distance between trigger and content in pixels.
interactive
boolean-Allows pointer interaction inside tooltip content.
portal
boolean-Reserved for automatic portal rendering in higher-level helpers.
avoidCollisions
boolean-Allows the tooltip to flip or shift to stay visible.
matchTriggerWidth
boolean-Matches tooltip content width to the trigger width.
placement
'top' | 'top-start' | 'top-end' | 'right' | 'right-start' | 'right-end' | 'bottom' | 'bottom-start' | 'bottom-end' | 'left' | 'left-start' | 'left-end''top'Preferred placement for tooltip content relative to the trigger.
disabled
booleanfalseDisables tooltip interaction and prevents it from opening.

Tooltip.Trigger

PropTypeDefaultDescription
asChild
boolean-Composes trigger behavior onto a single child element.
childrenRequired
ReactNode-Trigger content.
disabled
booleanfalseDisables tooltip interaction for this trigger.

Tooltip.Content

PropTypeDefaultDescription
childrenRequired
ReactNode-Tooltip content shown while open.
forceMount
boolean-Keeps tooltip content mounted when closed.
withArrow
boolean-Renders a small arrow pointing at the trigger.
className
string-Class name applied to the tooltip content element.
style
CSSProperties-Inline style applied to the tooltip content element.

Accessibility

Guidance for accessible usage and interaction.

Supplemental text

Use tooltips for supplemental labels, not as the only way to complete a task.
childrendisabled

Delay behavior

Choose open and close delays that keep hover and focus behavior predictable.
delayonOpenChange

Related components

Explore components that are commonly used alongside this one.