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

PropTypeDefaultDescription
classNamestring-Custom CSS class for styling
childrenReactNode-Children elements
iconSizenumber40Size of the icon
iconMagnificationnumber60Level of icon magnification
iconDistancenumber140Distance from cursor to magnify icon
directionstring"middle"Direction of the dock

DockIcon

PropTypeDefaultDescription
sizenumber40Size of the icon
magnificationnumber60Level of icon magnification
distancenumber140Distance from cursor to magnify icon
mouseXany-Mouse X position for magnification
classNamestring-Custom CSS class for styling
childrenReact.ReactNode-Children elements
propsPropsWithChildren-Additional props

Credits

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