Build a cursor effects showcase with particle trails, magnetic attraction, elastic…
- User
Build a cursor effects showcase with particle trails, magnetic attraction, elastic following, rainbow ribbons, and constellation connections and many more.
Assistant
I'll build an impressive cursor effects showcase. Let me first explore the project structure to understand the setup.
Tailwind v4 is set up. Let me check the main entry and utility files.
Let me check the TypeScript config to avoid build errors from strict settings.
The project uses Tailwind v4, React 19, and
vite build(no separate type-check step). The single-file plugin means everything gets inlined. Now I'll build the showcase.My plan:
- Core types + a cursor engine hook (canvas, pointer tracking with velocity, RAF loop, DPR scaling, click detection)
- 12 effects as self-contained modules (particle trail, rainbow ribbon, constellation, sparkles, bubbles, orbit, liquid bloom, neon bolt, elastic ghosts, fireworks, magnetic field, inferno)
- A polished App UI with a glassmorphism dock, magnetic buttons, intensity control, auto-cycle, and keyboard shortcuts
Let me start with the core types, engine, and the first set of effects.
Core engine and first 6 effects are in. Now the remaining 6 effects plus the registry.
All 12 effects are registered. Now I'll build the polished App UI with the glassmorphism dock, magnetic buttons, info card, intensity control, auto-cycle, and keyboard shortcuts.
Now I'll add global base styles and update the page title.
Let me verify the file structure is complete before building.
All files are in place. Let me build the project to confirm everything compiles correctly.
The build succeeded — everything compiles and inlines into a single
index.html. Here's what I built:🎨 Cursor FX Lab — an interactive cursor effects showcase
A full-screen canvas engine drives 12 distinct cursor effects, each a self-contained module sharing one high-performance
requestAnimationFrameloop with DPR-aware rendering, pointer velocity tracking, and click-burst detection.The effects (covering every requested one + more)
# Effect What it does ✨ Particle Trail Comet sparks stream from the cursor and fade 🌈 Rainbow Ribbon Smooth multi-layer spectrum silk ⭐ Constellation Living star map with proximity connections 💫 Sparkles Tumbling five-point stars 🫧 Bubbles Wobbling prismatic soap bubbles 🪐 Orbit Moons on elliptical orbits around the cursor 💧 Liquid Bloom Viscous neon goo that smears & pools ⚡ Neon Bolt White-hot electric plasma streak 👻 Elastic Ghosts Springy lagging chain (elastic following) 🎆 Fireworks Auto + click-launched color explosions 🧲 Magnetic Field Iron filings pulled into vortices (magnetic attraction) 🔥 Inferno Rising flame embers shifting gold→crimson Interaction & UX
- Click anywhere to trigger a burst/launch on effects that support it
- Glassmorphism bottom dock where each button magnetically leans toward your cursor — magnetic attraction demonstrated in the UI itself
- Live info card with the active effect's name, tagline, description, and an intensity slider that scales particle counts/sizes live
- Auto-cycle toggle that tours every effect every 5.5s
- Keyboard shortcuts:
←/→switch effects,↑/↓intensity,Spaceauto-cycle,1–9/0jump to an effect - Motion-blur trails via translucent overlays, additive (
lighter) blending for neon glow, per-effect clearing strategies, and particle caps for smooth 60fps
All effect state is encapsulated in factory closures with proper
reset()on switch/resize. Try moving, clicking, and dragging across the canvas to see each effect react.Files built:
src/types.ts,src/useCursorEngine.ts,src/effects/particleTrail.ts,src/effects/rainbowRibbon.ts,src/effects/constellation.ts,src/effects/sparkles.ts,src/effects/bubbles.ts,src/effects/orbit.ts,src/effects/liquidBloom.ts,src/effects/neonTrail.ts,src/effects/ghostCursors.ts,src/effects/fireworks.ts,src/effects/magneticField.ts,src/effects/inferno.ts,src/effects/index.ts,src/App.tsx,src/index.css,index.html
Other models, same or similar prompt
Responses were produced in different, uncontrolled contexts (system prompts, settings, prior turns). This is not a benchmark.