Stop Rebuilding UI

Shadcn.io is not affiliated with official shadcn/ui

React Sparkles Background

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

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.

React Sparkles Background preview

Scroll to load preview

Installation

FAQ

Was this page helpful?

Sign in to leave feedback.