Make your AI a shadcn expert

React Sparkles Background

Twinkling sparkle particles powered by tsparticles—gentle floating lights with opacity fade

React Sparkles Background preview

Scroll to load preview

Tiny light points drifting and twinkling across the screen—that magical sparkle dust effect. This uses the tsparticles engine (the slim bundle to keep things lightweight) for efficient canvas rendering. Particles fade in and out with random opacity animation, creating that classic star-twinkle look. The particle count is density-based (per 400×400px area), so it scales naturally with container size. Click anywhere to spawn a few extra particles. The whole thing fades in smoothly once initialized. Good for premium product pages, holiday themes, fantasy game UIs, or anywhere you want that touch of magic.

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 sparkles background into my project

FAQ

Was this page helpful?

Sign in to leave feedback.