Introducing Magic UI Pro - 50+ blocks and templates to build beautiful landing pages in minutes.


Docs
Dock

Dock

An implementation of the MacOS dock using react + tailwindcss + framer motion

Installation

npx shadcn@latest add "https://magicui.design/r/dock"

Examples

Custom Direction

Custom magnification

Props

Dock

PropTypeDescriptionDefault
classNamestringCustom CSS class for styling-
childrenReactNodeChildren elements-
iconSizenumberSize of the icon40
iconMagnificationnumberLevel of icon magnification60
iconDistancenumberDistance from cursor to magnify icon140
directionstringDirection of the dock"middle"

DockIcon

PropTypeDescriptionDefault
sizenumberSize of the icon40
magnificationnumberLevel of icon magnification60
distancenumberDistance from cursor to magnify icon140
mouseXanyMouse X position for magnification-
classNamestringCustom CSS class for styling-
childrenReact.ReactNodeChildren elements-
propsPropsWithChildrenAdditional props-

Credits

  • Credits to Build UI for this fantastic component
  • Credits to Ritesh Bucha for finding and improving it