Stop Rebuilding UI

Shadcn.io is not affiliated with official shadcn/ui

React Particles Background

Canvas floating particles with mouse magnetism—particles drift and respond to cursor movement

This particle system is all about subtle interactivity. Hundreds of tiny dots float around the screen, each with its own random drift velocity. But here's where it gets interesting: they're magnetized to your cursor. Each particle has a different magnetism strength, so some follow closely while others barely react—it creates this nice layered depth effect. The staticity prop controls how strongly they respond overall, and ease smooths out the movement. It's canvas-based so performance is solid even with 100+ particles. When particles drift off-screen, they respawn with a smooth alpha fade at the edges. Good for hero sections, ambient backgrounds, or anywhere you want that floaty, responsive feel.

React Particles Background preview

Scroll to load preview

Installation

FAQ

Was this page helpful?

Sign in to leave feedback.