Mohammad Shehadeh

Dock

Navigation 2

About

macOS-style dock with cursor magnification: icons scale and spring as the pointer passes, with hover and focus labels. Built on motion.

Built with React and Tailwind. Copy the prompt and paste it into Claude Code, Cursor or Lovable: your agent adds Dock to your project and fits it to your theme.

Code

How Dock is used: the demo's code. The component's own source comes with a free account.

Usage.tsx

'use client';

import { Dock, DockItem, DockLabel } from '@/components/ui/dock';
import { Calendar, Folder, Home, Mail, Music, Settings } from 'lucide-react';

export default function DockDemo() {
  const APPS = [
    { key: 'home', label: 'Home', icon: Home },
    { key: 'files', label: 'Files', icon: Folder },
    { key: 'mail', label: 'Mail', icon: Mail },
    {
      key: 'calendar',
      label: 'Calendar',
      icon: Calendar,
    },
    { key: 'music', label: 'Music', icon: Music },
    {
      key: 'settings',
      label: 'Settings',
      icon: Settings,
    },
  ];

  return (
    <div className="flex w-full max-w-xl items-end justify-center pt-12">
      <Dock>
        {APPS.map((app) => (
          <DockItem key={app.key} aria-label={app.label}>
            <DockLabel>{app.label}</DockLabel>
            <app.icon />
          </DockItem>
        ))}
      </Dock>
    </div>
  );
}

Dependencies

More by Mohammad Shehadeh

View all
  • Ecommerce Category Page

    Ecommerce Category Page

    110
  • Feature Problem Cards

    Feature Problem Cards

    105
  • Split Login

    Split Login

    99
  • Feature Grid Spotlight Cards

    Feature Grid Spotlight Cards

    96
  • Rounded Top Footer

    Rounded Top Footer

    87
  • FAQ Two Column

    FAQ Two Column

    84
  • Comparison Section

    Comparison Section

    83
  • Comparison Table

    Comparison Table

    79

More in Navigation

View all
  • Footer with Big Wordmark

    Footer with Big Wordmark

    67
  • Liquid Glass Expandable Sidebar

    Liquid Glass Expandable Sidebar

    193
  • Sidebar

    Sidebar

    408
  • Button Breadcrumb

    Button Breadcrumb

    34
  • Menu

    Menu

    26
  • Breadcrumb

    Breadcrumb

    7
  • Pagination with Ellipsis

    Pagination with Ellipsis

    25
  • Pagination with Icon and Label

    Pagination with Icon and Label

    24

Explore more

Part of Hirael — browse the full library on 21st.dev.