Base Components
Tooltip
Tooltips add additional context to interactive UI elements and appear on mouse hover or keyboard focus.
Coming from Figma
In Figma the Tooltip uses Type (8 position variants), Size (2X-Small / Small / Large), Dark Mode, and Tail. In code:
- Position: not a variant; use Radix's
side(top/right/bottom/left) andalignprops onTooltip.Content. See the Position example below. - Dark Mode: the
variantprop (dark|light). - Size: the
sizeprop (xsmall|small|medium). The naming differs from Figma (Figma's 2X-Small ≈xsmall). - Tail: the arrow is always rendered by
Tooltip.Content.
Installation
Install the following dependencies:
terminal
npm install @radix-ui/react-tooltipCreate a tooltip.tsx file and paste the following code into it.
/components/ui/tooltip.tsx
Update the import paths to match your project setup.
Examples
Light
Size
Position
HTML Content
API Reference
This component is based on the Radix UI Tooltip primitives. Refer to their documentation for the API reference.
Tooltip.Root
Supports all of Radix Tooltip Root props and adds:
| Prop | Type | Default |
|---|---|---|
variant | "dark"|"light" | "dark" |
size | "medium"|"small"|"xsmall" | "small" |
© 2026 AlignUI Design System. All rights reserved.
