Dock

A macOS-style dock with magnifying icons as you hover over them.

Examples

Vertical Dock

Install using CLI

npm
pnpm
bun
yarn
npx shadcn-vue@latest add "https://inspira-ui.com/r/dock.json"

Install Manually

Copy and paste the following code in the same folder

Dock.vue
DockIcon.vue

API

Dock

Prop NameTypeDescription
classstringAdditional classes to apply to the dock container.
magnificationnumberMagnification factor for the dock icons on hover (default: 60).
distancenumberDistance from the icon center where magnification applies.
directionstringAlignment of icons (top, middle, bottom) (default: middle).
orientationstringOrientation of Dock ('vertical, horizontal) (default: horizontal).
Slot NameDescription
defaultDock Dock or other child components to be displayed.

DockIcon

Slot NameDescription
defaultComponent or icon to be displayed inside the dock icon.

Credits

  • Credits to macOS Dock for the design inspiration and the fantastic hover magnification effect.