Harsh Jadhav

Magnetic Dock

Buttons 108

About

A macOS-style dock with magnetic hover scaling, spring physics, tooltips, badges, and active indicators for navigation bars.

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

Code

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

Usage.tsx

"use client"

import {
    MagneticDock,
    DockIconHome,
    DockIconSearch,
    DockIconFolder,
    DockIconMail,
    DockIconMusic,
    DockIconSettings,
    DockIconTrash,
} from "@/components/ui/magnetic-dock"

export default function MagneticDockDemo() {
    const items = [
        { id: "home", label: "Home", icon: <DockIconHome />, isActive: true },
        { id: "search", label: "Search", icon: <DockIconSearch /> },
        { id: "files", label: "Files", icon: <DockIconFolder /> },
        { id: "mail", label: "Mail", icon: <DockIconMail />, badge: 3 },
        { id: "music", label: "Music", icon: <DockIconMusic /> },
        { id: "settings", label: "Settings", icon: <DockIconSettings /> },
        { id: "trash", label: "Trash", icon: <DockIconTrash /> },
    ]

    return (
        <div className="flex min-h-[320px] w-full items-end justify-center pb-8">
            <MagneticDock items={items} />
        </div>
    )
}

Dependencies

More by Harsh Jadhav

View all
  • Scroll Choreography

    Scroll Choreography

    1K
  • Collection Surfer

    Collection Surfer

    831
  • Cursor Driven Particles Typography

    Cursor Driven Particles Typography

    747
  • Liquid Glass Carousel

    Liquid Glass Carousel

    493
  • Wheel Carousel

    Wheel Carousel

    450
  • Animated Gradient

    Animated Gradient

    386
  • Circuit Board

    Circuit Board

    169
  • Infinite Image Field

    Infinite Image Field

    111

More in Buttons

View all
  • Texture Button

    Texture Button

    99
  • Button

    Button

    8
  • HeroUI Button Group

    HeroUI Button Group

    2
  • Base Button

    Base Button

  • Button

    Button

    6
  • Button

    Button

    69
  • Eclipse Button

    Eclipse Button

    7
  • App Store Button

    App Store Button

    466