Spark Waves

Radial spark waves pulse outward and inward, creating a dynamic energy-driven background layer.

Spark Waves,
Background.

Installation

npx shadcn@latest add https://scrollxui.dev/registry/spark-waves.json 

Usage

import { SparkWaves } from "@/components/ui/spark-waves";
<SparkWaves
      sparkColor="#818cf8"
      sparkSize={12}
      sparkCount={28}
      duration={4500}
      waveInterval={1600}
      maxRadius={900}
      ringsPerWave={7}
      ringSpacing={55}
      enableInward={true}
      className="w-full h-[350px]"
    >
      <h2 className="bg-clip-text text-transparent text-center bg-gradient-to-b from-neutral-900 to-neutral-700 dark:from-neutral-600 dark:to-white text-2xl md:text-4xl lg:text-7xl font-sans py-2 md:py-10 relative z-20 font-bold tracking-tight">
        Spark Waves Animation, <br /> Background.
      </h2>
      </SparkWaves>

API Reference

Spark Waves

Radial spark waves pulse outward and inward, creating a dynamic energy-driven background layer.

Props

PropertyTypeDefaultDescription
sparkColorstring"#3b82f6"
Color of the sparks and glow effect.
sparkSizenumber10
Length of each animated spark line.
sparkCountnumber24
Number of sparks per ring.
durationnumber4000
Animation duration per wave in milliseconds.
easingstring"ease-out"
Easing curve applied to spark motion.
waveIntervalnumber1400
Delay between consecutive spark waves.
maxRadiusnumber1000
Maximum expansion radius of sparks.
ringsPerWavenumber6
Number of rings emitted per wave.
ringSpacingnumber50
Spacing between each spark ring.
enableInwardbooleantrue
Enables inward moving spark waves.
classNamestring
Custom classes for the container.
childrennode
Content rendered above the animation.

Built withby Ahdeetai.