import { TabProvider, TabTrigger, TabContent, TabList } from "@components/Tabs";
import { Story } from "@/components/Story";
import { LoadedCode, GITHUB } from "@/components/LoadedCode";
import { TooltipDemo } from "./TooltipBlocks/Preview";
import Examples from "./TooltipBlocks/Examples";
# Tooltip
A brief helper for providing contextual information or guiding user interactions.
Preview
Code
## Installation
1. Create a new file `Tooltip.tsx` in your component folder.
2. Copy and paste the following code into the file.
## Usage
```tsx
import { Tooltip, TooltipContent } from "@components/Tooltip";
```
```html
{/* Tooltip Content */}
{/* Tooltip Trigger */}
```
## Props
### Tooltip
#### Variants
| Prop | Type | Default | Description |
|:-----------|:-----------------------------------------|:--------|:-----------------------------|
| `position` | `"bottom" \| "left" \| "right" \| "top"` | `"top"` | The position of the tooltip. |
### TooltipContent
#### Variants
| Prop | Type | Default | Description |
|:---------|:------------------------------------------|:-----------|:---------------------------------------------------|
| `offset` | `"sm" \| "md" \| "lg"` | `"md"` | Gap between the tooltip and the trigger. |
| `delay` | `"none" \| "early" \| "normal" \| "late"` | `"normal"` | The time between hover start and appear of tooltip |
## Examples
### Top
Preview
Code
### Bottom
Preview
Code
### Left
Preview
Code
### Right
Preview
Code
### No Delay
Preview
Code
### Early Delay
Preview
Code
### Late Delay
Preview
Code
### Controlled
Preview
Code