Tooltip
A small informational popup that appears when users hover over or focus on an element.
Automatic Installation
This method is still working on progress, please use manual installation for now.
Manual Installation
Copy the code
Usage
Imports
Example
Browse the Storybook for more examples.
Anatomy
Props
Prop | Type | Default |
---|---|---|
delayDuration? | number | 150 |
defaultOpen? | boolean | false |
open? | boolean | - |
onOpenChange? | (open: boolean) => void | - |
TooltipContent Props
Prop | Type | Default |
---|---|---|
content? | React.ReactNode | - |
side? | top | right | bottom | left | top |
sideOffset? | number | 10 |
align? | start | center | end | center |
hideArrow? | boolean | false |
className? | string | - |
TooltipTrigger Props
Prop | Type | Default |
---|---|---|
asChild? | boolean | false |
onClick? | React.MouseEventHandler<HTMLButtonElement> | - |
Edit on GitHub
Last updated on