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

    4
  • Breadcrumb

    Breadcrumb

    4
  • Spinner

    Spinner

    1
  • Accordion

    Accordion

    1
  • Navbar

    Navbar

    1
  • Kbd

    Kbd

  • Pagination

    Pagination

More in Heroes

View all
  • Agency Hero Section

    Agency Hero Section

    1.1K
  • SaaS Template

    SaaS Template

    2.8K
  • AI SaaS Workflow Hero

    AI SaaS Workflow Hero

    32
  • Cabin To Sky Film Hero

    Cabin To Sky Film Hero

  • Real Estate 3D Hero

    Real Estate 3D Hero

    83
  • Hero

    Hero

    1.4K
  • Responsive Hero Banner

    Responsive Hero Banner

    2.2K
  • Chroma Sense Hero

    Chroma Sense Hero

    21