Dock
Web (React)
A highly interactive macOS-style dock that magnifies items on hover.
A beautiful icon dock. Built with Framer Motion, it applies complex physics interpolation to surrounding icons, smoothly magnifying them as the cursor approaches to create a realistic macOS dock effect.
Installation
CLI
npx @modus-ui/cli add dockManual
- Copy the code from the component tab.
- Create a file at
components/ui/dock.tsx. - Paste the code.
Usage
tsx
Props
| Prop | Type | Default | Description |
|---|---|---|---|
| children | ReactNode | - | The DockItem components. |
| size | number | 44 | Resting size of each item, in pixels. |
| magnification | number | 76 | Size an item reaches directly under the pointer. |
| reach | number | 130 | How far, in pixels, the magnification reaches. |
| className | string | "" | - |
Comments