Tooltip
A popup that displays information on hover or focus.
Preview
Installation
bash
npx auralix-ui add tooltipUsage
Basic Tooltip
tsx
import { Tooltip } from "@/components/ui/Tooltip";
import { Button } from "@/components/ui/Button";
<Tooltip content="This is a tooltip">
<Button>Hover me</Button>
</Tooltip>Tooltip Positions
tsx
<Tooltip content="Top" position="top">
<Button>Top</Button>
</Tooltip>
<Tooltip content="Bottom" position="bottom">
<Button>Bottom</Button>
</Tooltip>
<Tooltip content="Left" position="left">
<Button>Left</Button>
</Tooltip>
<Tooltip content="Right" position="right">
<Button>Right</Button>
</Tooltip>Props
| Name | Type | Default | Description |
|---|---|---|---|
content | string | - | The tooltip text content. |
position | "top" | "bottom" | "left" | "right" | "top" | The position of the tooltip. |
children | ReactNode | - | The trigger element. |
Variants
Simple
Rich
Arrow
On this page