Introducing Motion-Primitives Pro - Advanced components and templates to help you build a website that stands out.

Dock

A versatile UI element that provides a flexible and customizable way to organize and display menu items within your application.

Examples

Apple style dock

Installation

npx shadcn add "https://motion-primitives.com/c/dock.json"

Component API

Dock

PropTypeDefaultDescription
childrenReactNodeThe child elements to be animated.
classNamestringundefinedOptional CSS class for styling the component.
springSpringOptions{ mass: 0.1, stiffness: 150, damping: 12 }Spring options from motion for animation effects.
magnificationnumber80The scaling factor applied to a dock item on hover.
distancenumber150The distance from the center of a dock item at which the magnification animation starts.
panelHeightnumber64

DockItem

PropTypeDefaultDescription
childrenReactNodeDockLabel and DockIcon
classNamestringundefinedOptional CSS class for styling the component.

DockLabel

PropTypeDefaultDescription
childrenReactNodeContent of the label, typically a string or formatted text.
classNamestringundefinedOptional CSS class for styling the component.

DockIcon

PropTypeDefaultDescription
childrenReactNodeIcon
classNamestringundefinedOptional CSS class for styling the component.

Credits

Created by @kashyap20, inspired by Build UI - Magnified Dock