Tooltip
A popup that shows related information on hover or keyboard focus. Content inherits writing direction via useDirection so text stays correct in RTL portals.
Basic
Show a short hint on hover or focus.
Installation
CLI
Setup
Wrap the app (or a large subtree) with TooltipProvider.
layout.tsx
Composition
structure
Usage
tooltip.tsx
Direction
Use align="start" / "end" for alignment that follows writing direction. side values left / right stay physical.
direction.tsx
Props
| Prop | Type | Default | Description |
|---|---|---|---|
| side | "top" · "right" · "bottom" · "left" | "top" | On `TooltipContent` — preferred edge of the trigger. |
| align | "start" · "center" · "end" | "center" | On `TooltipContent` — prefer `start`/`end` with writing direction. |
| sideOffset | number | 0 | Distance in pixels from the trigger. |
| delayDuration | number | 0 | On `TooltipProvider` — open delay in ms. |