~/siddharthsiddharth_meena
PortfolioAboutComponents
Back to Components

Minimal Tooltip

A lightweight tooltip component that displays contextual information on hover with customizable positioning and smooth fade animations.

Preview

Installation

Install the component using the CLI.

npx shadcn@latest add https://siddz.com/r/tooltip.json

Usage

Import the component:

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

Use it in your code:

<Tooltip text="Helpful information">
  <button>Hover me</button>
</Tooltip>

Props

PropertyTypeDefaultDescription
children*ReactNode-The element that triggers the tooltip on hover.
text*string-The text content to display in the tooltip.
positionstring"top"Position of the tooltip relative to the trigger element. Options: 'top', 'bottom', 'left', 'right'.
classNamestring""Additional CSS classes to apply to the tooltip container.

© 2025 Siddharth Meena.

PortfolioAboutComponents
X (Twitter)
Email
GitHub
Helpful information
Bottom position