ValyroUI Русская версия

Fireworks Background

Fireworks for wins and achievements, launch on click. Pro · Effects › Backgrounds

Fireworks behind content: rockets rise, burst into sparks that slow, fall and crackle out, each drawing a short fading streak (and, with the theme's glow, a soft halo). On a dark sky the light adds up into a bloom where sparks crowd and fresh sparks burn white-hot before cooling to their colour. For moments of celebration (a win, a new rank), not a permanent backdrop. The sky opens with a salute already bursting. The canvas runs at a capped pixel ratio and only while on screen and the tab is visible; reduced motion draws a still burst.

Installation

npx valyro-cli@latest login
npx valyro-cli@latest add fireworks-background
npm install valyro-ui-pro

import 'valyro-ui-pro/styles.css';
import { FireworksBackground } from 'valyro-ui-pro';

Props

PropTypeDefault
populationnumber1Launches per second, roughly (default 1).
colorstring | readonly string[]One colour or a palette for the bursts (default: the theme's chart colours).
fireworkSpeedRange{ min: 4, max: 8 }Launch speed range, px per frame at 60 fps (default 4–8).
fireworkSizeRange{ min: 2, max: 5 }Rocket size range, px (default 2–5).
particleSpeedRange{ min: 2, max: 7 }Burst speed range of the sparks, px per frame at 60 fps (default 2–7).
particleSizeRange{ min: 1, max: 5 }Spark size range, px (default 1–5).
glownumberSoft halo around each spark, 0–1 (default: the theme's --ui-fireworks-background-glow).
launchOnClickbooleantrueA click or tap launches a rocket at that point (default true).
canvasPropsComponentPropsWithoutRef<'canvas'>Props for the canvas element.

Related components

Previous: Hole Background · Next: Spotlight · All Effects