Back to Components

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.json

Usage

Import the component:

import { Tooltip } from "@/components/ui/tooltip";

Use it in your code:

<Tooltip content="Hey there">
  <button>Hover me</button>
</Tooltip>

Props

PropertyTypeDefaultDescription
contentReactNode—What the tooltip shows.
side"top" | "bottom" | "left" | "right""top"Placement relative to the trigger.
delaynumber120Open delay in ms.
childrenReactNode—The trigger element.