I'll build a full macOS-style dock experience. Let me start by installing dependencies and generating the icon assets.
All assets generated successfully. Now let's build the components.
Now let's create the data file, components, and wire everything together.
Now let's create the DockIcon component:
Need to fix typing for the ease values. Let me correct with as const.
Now let's create the AppWindow (faux launched window) and MenuBar components:
Now let's create the main Dock component that ties everything together with drag reordering:
Now let's wire up App.tsx with the desktop background, menu bar, dock, and app window:
Now let's update the page title and try building the project:
The build succeeded on the first try. Let me review the generated dock icons to make sure they look good.
All assets are in place and the build completed successfully.
Summary
I built a fully interactive macOS-style dock in src/App.tsx and a set of supporting components:
src/components/dock/DockIcon.tsx — Individual dock icon with:
- Mouse-distance based magnification (icons scale up smoothly with springs as the cursor approaches, using
framer-motion's useTransform/useSpring)
- Hover tooltip showing the app name
- Bounce launch animation on click (variant-driven keyframe animation) plus a distinct "shake" variant for the trash
- Active-app indicator dot beneath the icon
- Special fanned-square treatment for folder-type icons to hint at a stack
src/components/dock/Dock.tsx — The dock container:
- Shares a single
mouseX motion value across all icons for coordinated magnification
- Uses
Reorder.Group/Reorder.Item for real drag-and-drop reordering of the middle app icons
- Pinned Finder, Downloads folder, and Trash on the sides with dividers
- Manages bounce state and active/open app callbacks
src/components/dock/FolderPopup.tsx — A glassy popup "stack" grid that fans out above the Downloads folder with staggered spring-in file icons, mimicking macOS folder stacks.
src/components/dock/AppWindow.tsx — A faux app window (traffic-light buttons, icon, title) that pops in with a spring animation when an app finishes its launch bounce, demonstrating the active-indicator/window relationship (Close keeps it "running", Quit removes the indicator).
src/components/dock/MenuBar.tsx — A decorative top menu bar with a live clock for extra realism.
I also generated custom glossy app icons (Finder, Safari, Messages, Photos, Music, Mail, Folder) and a gradient desktop wallpaper via AI image generation, and updated the page title in index.html. The project builds cleanly with npm run build.
Files built: src/data/apps.ts, src/components/dock/DockIcon.tsx, src/components/dock/FolderPopup.tsx, src/components/dock/AppWindow.tsx, src/components/dock/MenuBar.tsx, src/components/dock/Dock.tsx, src/App.tsx, index.html