alwkala

Canvas Sparks

Heroes

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>
  );
}

More by alwkala

View all
  • Callout

    Callout

    10
  • Progress Bar

    Progress Bar

    2
  • Breadcrumb

    Breadcrumb

    1
  • Navbar

    Navbar

    1
  • Kbd

    Kbd

  • Pagination

    Pagination

  • Back To Top

    Back To Top

  • Checkbox

    Checkbox

More in Heroes

View all
  • Agency Hero Section

    Agency Hero Section

    1.1K
  • Responsive Hero Banner

    Responsive Hero Banner

    2.2K
  • SaaS Template

    SaaS Template

    2.7K
  • Centered Hero with Image Fan

    Centered Hero with Image Fan

    1.1K
  • Hero

    Hero

    1.4K
  • Hero Section 01

    Hero Section 01

    56
  • Split Hero With Image Cards

    Split Hero With Image Cards

    467
  • Facts Hero

    Facts Hero

    6