Icon toolbar
The everyday use: names for icon buttons. One provider holds the delay (a calm 300 ms), and once one note is open the next opens at once as you sweep along the row. Each button still has its own aria-label.
A sticky note stuck next to a control, with a felt-tip arrow pointing at it. It names an icon button or adds a hint, opens on hover and keyboard focus with a shared delay, and never hides anything a person needs to be able to read.
npx shadcn@latest add @wobko/tooltipFirst time here? Add the registry to components.json first. How to install
The everyday use: names for icon buttons. One provider holds the delay (a calm 300 ms), and once one note is open the next opens at once as you sweep along the row. Each button still has its own aria-label.
The arrow follows whichever side the note opens on (Radix flips it near the edge of the screen). Any stock makes a note: sticky pads in four colors, or a plain slip.
A per-tooltip delayDuration overrides the provider's: instant for a quick label, patient for an explanation. A shortcut hint sits in the note in the mono font.
A disabled button gets no pointer or focus events, so it cannot show a tooltip. Wrap it in a focusable span and point aria-describedby at a reason that is always in the page (the note only exists while open): keyboard, mouse and screen-reader users all learn why.
Official `tooltip-demo`: a Hover button with the note "Add to library". The note is a sticky with a felt-tip arrow, opened by hover and keyboard focus. Radix needs a `TooltipProvider` above every tooltip (shadcn's docs site supplies it at the root), so the example wraps its own.
Wrap the app or a region once. Its delays are shared by every tooltip inside, and after one has opened the next opens at once (`skipDelayDuration`). Renders no element.
| Prop | Type | Default | Description |
|---|---|---|---|
| delayDuration | number | 0 | Milliseconds of hover before a tooltip opens (upstream's default is 0; 300-700 is calmer for dense toolbars). |
| skipDelayDuration | number | 300 | How long after one closes the next opens with no delay. |
| disableHoverableContent | boolean | false | Close as soon as the pointer leaves the trigger, without letting it travel onto the note. |
The sticky note: a Paper that is also the tooltip content (a CSS sheet, so it costs no SVG). Radix places it (`side`, `align`, `sideOffset`) and turns the arrow to face the trigger.
| Prop | Type | Default | Description |
|---|---|---|---|
| arrow | boolean | true | The hand-drawn arrow between the note and the trigger. |
| stock | StockName | "sticky-yellow" | What the note is made of: sticky-yellow, sticky-pink, sticky-blue, sticky-green, slip, index-card ... |
| tilt | boolean | number | true | Seeded tilt of the note (sticky stock turns up to 1.6 degrees); the text stays upright. |
| sideOffset | number | 1 | Gap between the trigger and the note, on top of the arrow's height. |
| collisionPadding | number | Partial<Record<Side, number>> | 8 | Room kept between the note and the viewport edge when it has to shift to fit (upstream's default is 0: a note at the edge of a toolbar touched the window). |
| seed | string | number | - | Pins the hand. |
The files the CLI copies into your project.
Loading the source