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-
magnificationnumberLevel of icon magnification60
distancenumberDistance from cursor to magnify icon140
directionstringDirection of the dock"bottom"

DockIcon

PropTypeDescriptionDefault
sizenumberSize of the icon-
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