INDEPENDENT STUDIO / INDIA & NEPAL
Component Concept

Interactive macOS-Style Magnetic Floating Dock

A floating navigation dock with dynamic magnetic mouse tracking and physics-based spring scaling. As the user hovers across the dock, items seamlessly expand and elevate depending on the cursor's proximity. It includes an emerald-gradient active state with glowing indicator dots, sleek glassmorphism backdrop, badge indicators, and animated tooltips.

●interactive-macos-style-magnetic-floating-dock.design

Exact AI Prompt

Copy and paste into Cursor, Claude, or ChatGPT

Create a modern, responsive React TypeScript navigation dock component inspired by macOS dock mechanics and luxury glassmorphism aesthetics with Framer Motion and Tailwind CSS. Key Design & Interaction Specifications: 1. Physics & Magnetic Proximity: - Track mouse X position continuously across the dock using Framer Motion `useMotionValue`. - Calculate distance between cursor and each icon's center using `useTransform`. - Scale icons from 1.0 up to 1.25x (or custom maxScale) within a magnetic distance threshold (e.g., 80px), accompanied by a subtle upward elevation (-8px). - Use spring physics with `{ damping: 20, stiffness: 300, mass: 0.5 }` for natural deceleration. - On tap/click, apply active bounce scale (0.92). 2. Aesthetic & Theming: - Dock Container: Floating pill-shaped bar (`rounded-full`) with glassmorphism `bg-[#FAFAF7]/85`, `backdrop-blur-xl`, subtle border `border-[#1E1E1E]/10`, and deep diffuse shadow `shadow-[0_12px_40px_rgba(30,30,30,0.08)]`. - Inactive Icons: `bg-white/90` container, text `#4B5563`, soft border with emerald glow on hover (`hover:text-[#10A37F] hover:border-[#10A37F]/30`). - Active Icon: Vibrant emerald vertical gradient `bg-gradient-to-b from-[#10A37F] to-[#0B7D66]` with white text and a centered white active dot indicator `activeDockDot` at the bottom. - Notification Badge: Small rounded pill badge with emerald highlight in top-right corner. - Tooltips: Monospace uppercase label tooltip in dark floating card (`bg-[#0F172A]`) appearing smoothly on hover with `AnimatePresence`. 3. Flexibility & Props: - Support vertical/horizontal orientation (`top`, `bottom`, `left`, `right`). - Allow custom variants (`glass`, `solid`, `transparent`). - Accept customizable items: `{ id, label, icon, onClick, isActive, badge }`. - Provide responsive adaptations for mobile (smaller default size and scale threshold).