Magnetic Dock
PROA macOS-style dock where icons swell as the cursor approaches, with spring physics and labels.
React 19Tailwind 4motionadded 2026-12-01
live preview · magnetic dock
Installation
Into your bowl in one line.
The CLI drops the source straight into your project. You own every line; there’s no package to update.
- 01
Add it with the CLI
$ npx bowls@latest add magnetic-dock - 02
Or go manual: install the one dependency
npm i motion - 03
Serve it
Paste the source into
components/bowls/magnetic-dock.tsxand import it — the Code tab’s demo.tsx shows a full example.
Props
| PROP | TYPE | DEFAULT | WHAT IT DOES |
|---|---|---|---|
| items | DockItem[] | — | Icons, labels and actions to show. |
| base | number | 48 | Resting icon size, in px. |
| magnification | number | 76 | Largest size an icon grows to, in px. |
| reach | number | 140 | How far the cursor’s pull is felt. |
| spring | "soft" | "snappy" | "bouncy" | "snappy" | Feel of the magnification. |