Build a Mac-style dock with icon magnification on hover, draggable reordering, active…
- User
Build a Mac-style dock with icon magnification on hover, draggable reordering, active indicators, bouncing launch animation, and folder stacks.
Assistant
I have created a macOS Dock experience built with React, Vite, Framer Motion, and Tailwind CSS.
Key Features Implemented:
-
Mac-style Dock with Hover Magnification:
- Proximity-based Gaussian cosine magnification formula () where neighboring icons swell smoothly in proportion to mouse distance.
- Powered by Framer Motion
useSpringanduseTransformphysics for smooth 120fps animation.
-
Draggable Reordering:
- Drag & drop dock items to reorder them in real-time.
- Positions persist automatically in
localStorage.
-
Active Indicators:
- Authentic glowing white dot indicators underneath running applications.
- Dimmed state indicators for minimized windows.
-
Bouncing Launch Animation:
- Double-peak spring bounce animation when launching or restoring apps from the dock.
- Accompanied by synthesized Web Audio API sound feedback.
-
Interactive Folder Stacks:
- Downloads, Documents, Photos & Trash Stacks:
- Fan View: Stacks curved into screen space with tilt angles and depth layers.
- Grid View: Backdrop-blur glass grid with search filter.
- List View: Compact vertical macOS file list.
- Quick Look (Spacebar/Click): Preview images, PDF text, code snippets, audio tracks with simulated waveforms.
-
Interactive Applications:
- Finder: Browse files, create notes, inspect storage.
- Safari: Browser with multi-tab showcase.
- Notes: Markdown notepad with auto-save.
- Apple Music: Audio player with animated sound spectrum visualizer.
- Photos: Gallery modal with live filters (Vintage, Cyberpunk, Grayscale).
- Calculator: Authentic Mac glass calculator.
- Messages: iMessage chat interface with automated responses.
- Launchpad: Fullscreen blurred app grid with "Add Custom App Shortcut" feature.
- System Settings: Complete control panel for icon sizes, magnification power, auto-hide, dock screen position (Bottom, Left, Right), wallpapers, and sound FX.
Files built:
index.html,src/types/dock.ts,src/utils/sound.ts,src/data/initialData.ts,src/context/DockContext.tsx,src/components/dock/DockIconRenderer.tsx,src/components/dock/FolderStackPopover.tsx,src/components/desktop/QuickLookModal.tsx,src/components/dock/DockIcon.tsx,src/components/dock/Dock.tsx,src/components/apps/FinderApp.tsx,src/components/apps/SafariApp.tsx,src/components/apps/NotesApp.tsx,src/components/apps/MusicApp.tsx,src/components/apps/PhotosApp.tsx,src/components/apps/CalculatorApp.tsx,src/components/apps/MessagesApp.tsx,src/components/apps/SystemSettingsApp.tsx,src/components/apps/LaunchpadApp.tsx,src/components/apps/TrashApp.tsx,src/components/apps/WindowManager.tsx,src/components/desktop/MenuBar.tsx,src/components/desktop/ControlCenter.tsx,src/components/desktop/Desktop.tsx,src/App.tsx-
Other models, same or similar prompt
Responses were produced in different, uncontrolled contexts (system prompts, settings, prior turns). This is not a benchmark.