Effect · background layer

Fireworks effect

The Zeenat fireworks effect creates bounded celebratory bursts in the background layer. Each burst uses small DOM particles, seeded placement and compositor-friendly transforms.

Installation and imports

Install Zeenat once, then use the aggregate effects entry or the smallest explicit subpath. Both paths are exported by package version 0.3.0.

Install
npm install zeenat
Imports
import { fireworks } from "zeenat/effects";
// or
import { fireworks } from "zeenat/effects/fireworks";

Basic usage

Fireworks.tsx
import { ZeenatScene } from "zeenat";
import { fireworks } from "zeenat/effects/fireworks";

const effects = [fireworks({ colors: ["#dc2626", "#f8fafc", "#2563eb"] })];

export function Decoration() {
  return <ZeenatScene effects={effects} />;
}

fireworks() options

Properties marked required have no factory default. Every other value below is taken from the current TypeScript source.

PropertyTypeRequiredDefaultDescription
colorsreadonly string[]YesrequiredOne or more CSS colors cycled across burst particles.
countnumberNo3Base number of repeating bursts.
maxYnumberNo0.52Maximum vertical origin, clamped from 0.16 to 0.72.
particlesPerBurstnumberNo10 (minimum 6)Particle count for every burst.
layer"background" | "ambient" | "foreground" | "top"No"background"Semantic layer used to order the effect inside the Zeenat scene.
ordernumberNoOptional ordering value among effects in the same semantic layer.

Examples

Subtle

Subtle
fireworks({ colors: ["#fbbf24", "#fff7ed"], count: 1, particlesPerBurst: 7 })

Intense

Intense
fireworks({ colors: ["#ec4899", "#22d3ee", "#facc15"], count: 5, particlesPerBurst: 14 })

Combined

Combined
const effects = [fireworks({ colors: ["#f43f5e", "#f8fafc"] }), sparkles({ colors: ["#fbbf24"], shape: "star" })];

Reduced motion

Fireworks are omitted entirely when effective motion is reduced.

Read the complete reduced-motion contract

Performance notes

Burst and particle counts are bounded. Transform and opacity animations run through WAAPI and counts shrink on small screens.

Zeenat performance architecture