A short label that names a control on hover, focus or long press, in Ink, Soft or a rich tab shape.
FreeWeb and MobileMotion
Preview
npx shadcn add @fetaui/tooltipPlayground
Sides
Ink
Soft
Rich
In context
Q3 planning review final notes.pdf2.4 MB
Tone
Side
Kind
Icons animation
Motion
Installation
Terminal· bash
npx shadcn add @fetaui/tooltip
Sides
Top by default. It flips on its own near an edge.
Tone
Accessibility
- role tooltip, tied to the trigger with aria-describedby, or aria-labelledby when
labelsis set. - It stays open while the pointer is over it, so it can be read and selected.
- A disabled button cannot take hover: wrap it in TooltipDisabledTrigger.
- Mobile shows on long press and hides 1.5 s after release.
Motion
- Shows in 140 ms from 0.96 and 4 px toward the trigger, with its origin at the nub. Hides with a 90 ms fade.
- Inside the 300 ms skip window a neighbour shows at once and glides over on a 500/36 spring.
- Rich unfolds the tab, then the tray 40 ms later.
- With reduced motion, it appears in place. The loading shimmer holds still.
Responsive behavior
- Label 12 on Web and 13 on Mobile. Max width 240 and 260.
- Rich is 280 on Web and 300 on Mobile.
- Flips near an edge and shifts along it to stay on screen.
Performance
- Nothing mounts until it opens. A hidden first pass measures the panel, then it animates in on its final side.
- One module level slot tracks the open tooltip, so a neighbour takes over at once and panels never stack.
- Scrolling the page closes it, and timers and listeners are cleared on close or unmount.
Note for AI
Give your coding assistant the Markdown reference instead of screenshots.
- Import Tooltip, TooltipRich, TooltipDisabledTrigger and TooltipTruncated from @/components/fetaui/tooltip after installing it.
- children must be one element that takes a ref and pointer props. Wrap a disabled control in TooltipDisabledTrigger.
- Set labels when the tooltip is the trigger's name, as on an icon only button.
- TooltipRich takes any side. Top and bottom pin the nub under the title tab, left and right center the panel on the trigger. Composes Kbd, Skeleton and the shared Floating layer.
Related
PopoverComponentAnchored context that stays close to its trigger: a pill, a Soft two part panel and a nub pointing back.Hover CardComponentA preview of what sits behind a link: it loads as a skeleton of the same shape and can be pinned open.KbdComponentA keycap for showing keyboard input. One key per cap, grouped as a combo, chord or sequence.Icon ButtonComponentThe round sibling of Button, for an action one icon can explain.ToolbarComponentA floating tool dock for canvas apps. It holds the current tool on an ink plate and redocks to any edge.