Tooltip
A short label that appears on hover or keyboard focus, for controls whose meaning isn't obvious, like icon buttons. It pops in on a quick spring and never holds anything you can click.
Install
npx shadcn@latest add @nelumbo/tooltipToolbar
Shortcuts sit after the label. Wrap the toolbar in one TooltipProvider: after the first tooltip, moving to the next one shows it right away.
Rich
A title and a sentence or two, for explaining a setting. Keep it to text; anything clickable belongs in a Popover.
Smart compose
Sides
Top is the default. It flips to stay on screen.
2h ago
Usage
import { Tooltip, TooltipTrigger, TooltipContent, TooltipProvider } from "@/components/ui/tooltip"<Tooltip> <TooltipTrigger asChild> <IconButton icon="format_bold" label="Bold" /> </TooltipTrigger> <TooltipContent shortcut="⌘B">Bold</TooltipContent></Tooltip>Props
Other props go to Radix Tooltip (open, onOpenChange, delayDuration, side, align…).
| Prop | Type | Default | Notes |
|---|---|---|---|
TooltipContent variant | "plain" | "rich" | "plain" | Rich: card with TooltipTitle |
TooltipContent shortcut | string | Keys shown after the label | |
TooltipProvider delayDuration | number | 400 | ms before the first tooltip shows |
TooltipProvider skipDelayDuration | number | 300 | Window in which the next tooltip shows at once |