About
An animated canvas background of softly drifting, glowing sparks for adding subtle ambient motion behind hero sections or dark panels.
Built with React and Tailwind. Copy the prompt and paste it into Claude Code, Cursor or Lovable: your agent adds Canvas Sparks to your project and fits it to your theme.
Code
How Canvas Sparks is used: the demo's code. The component's own source comes with a free account.
Usage.tsx
import CanvasSparks from "@/components/ui/canvas-sparks";
export default function CanvasSparksDemo() {
return (
<div className="relative w-full h-screen overflow-hidden flex flex-col items-center justify-center text-center p-6 bg-[#0d121f]">
<CanvasSparks count={45} variant="default" />
<div className="relative z-10 max-w-md">
<span className="inline-flex items-center rounded-full bg-[rgba(212,175,55,0.12)] text-[#d4af37] text-xs font-semibold px-3 py-1 mb-3">
Lightweight 0kb CPU background
</span>
<h4 className="text-xl font-extrabold text-white mb-2">
Smooth 60fps golden particle motion
</h4>
<p className="text-sm leading-relaxed text-slate-400">
These sparks run on a lightweight 2D canvas simulating gentle drift
and fade, with zero impact on page performance or battery life.
</p>
</div>
</div>
);
}















