Open GitHub repository
ComponentsTooltip

Tooltip

Provides a short, non-interactive explanation when a user hovers or focuses a control.

Installation

bunx @swift-rust/ui add tooltip

Usage

tsx
1import { Tooltip, TooltipProvider } from "@/components/ui/tooltip";
2 
3import { Button } from "@/components/ui/button";
4 
5<TooltipProvider>
6 <Tooltip label="Add to library">
7 <Button variant="outline">Add</Button>
8 </Tooltip>
9</TooltipProvider>

Composition

Tooltip is composed of these parts:

TooltipProvider
└── Tooltip
└── Trigger element

Examples