Make your AI a shadcn expert

React Particles Background

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

React Particles Background preview

Scroll to load preview

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.

Install with AI

If you've connected the shadcn.io MCP server to Claude Code, Cursor, Windsurf, or any MCP-ready AI editor, prompt your agent to install this background for you — no copy-paste, no CLI:

use shadcnio to install the particles background into my project

FAQ

Was this page helpful?

Sign in to leave feedback.