Tooltip
Follow Tooltip
A tooltip that springs in above a button and glides to the neighbouring button instead of re-opening.
npx motionsnack add follow-tooltipCustomize
<FollowTooltip />Props
8 properties
| Property | Type | Default | Description |
|---|---|---|---|
| items | { label: string; icon?: 'copy' | 'star' | 'share' | 'heart' | 'edit' | 'trash' }[] | 3 demo buttons | Trigger buttons, left to right. The label is the tooltip text and the accessible name. |
| onSelect | (index: number) => void | - | Called with the position of the clicked button. |
| className | string | '' | Extra classes on the row of buttons. |
| side | 'top' | 'bottom' | 'top' | Side of the buttons the tooltip opens on. |
| delay | number | 500 | Hover wait before the tooltip opens. Keyboard focus and a neighbour within 300ms open at once. |
| hideDelay | number | 150 | How long the tooltip stays after the pointer leaves, so the pointer can reach it or a neighbour. |
| duration | number | 0.4 | Seconds of the spring that opens the tooltip and moves it between buttons. |
| bounce | number | 0.3 | Spring bounce. |
About Follow Tooltip
Follow Tooltip renders a short row of icon buttons from an array of labels and shows one shared tooltip for all of them. The tooltip springs in above the hovered or focused button with a small arrow after a short delay. Move to a neighbour and it does not close and re-open: it glides across, its width eases to the new label and the text cross-fades. It opens on hover and on keyboard focus, closes on Escape, and the delay, offset and spring are all props. The tooltip uses role tooltip and is linked to the active button with aria-describedby.
What's included
- One shared tooltip that glides between neighbouring triggers
- Spring entrance with a small arrow
- Width eases to the new label while the text cross-fades
- Opens on hover and keyboard focus, closes on Escape
- Open delay that is skipped while moving between buttons
- role tooltip with aria-describedby and labelled buttons
- Top or bottom placement, light and dark looks
- Type
- Animated React tooltip component
- Library
- Components · Tooltip
- Stack
- Next.js, React, Tailwind CSS
- Added
- 2026-09-20
- Install