Tooltip
Theme-aware tooltip that springs in with a soft pop; hover + keyboard + reduced-motion aware.
motion
Preview
Installation
Install the component using the CLI.
npx shadcn@latest add https://yash-sakre.github.io/Yash-Sakre/r/tooltip.jsonUsage
Import the component:
import { Tooltip } from "@/components/ui/tooltip";Use it in your code:
<Tooltip content="Hey there">
<button>Hover me</button>
</Tooltip>Props
| Property | Type | Default | Description |
|---|---|---|---|
| content | ReactNode | — | What the tooltip shows. |
| side | "top" | "bottom" | "left" | "right" | "top" | Placement relative to the trigger. |
| delay | number | 120 | Open delay in ms. |
| children | ReactNode | — | The trigger element. |