1.2 KiB
1.2 KiB
- Home
- Components
- Tooltip
Tooltip
A popup that displays information related to an element when the element receives keyboard focus or the mouse hovers over it.
DocsAPI Reference## Props
Tooltip
| Prop | Type | Default | Description |
|---|---|---|---|
| ...Radix props | ComponentProps | - | All Radix tooltip root props |
TooltipContent
| Prop | Type | Default | Description |
|---|---|---|---|
| sideOffset | number | 0 | Offset in pixels from the trigger |
| ...Radix props | ComponentProps | - | All Radix content props |
Usage
Top Left Right Bottom ```jsx Top
Add to library
### Example
```jsx
<Tooltip>
<TooltipTrigger asChild>
<Button variant="outline">Hover</Button>
</TooltipTrigger>
<TooltipContent side="bottom">Hello</TooltipContent>
</Tooltip>