Confetti
A brand-coloured celebration burst that fires on any success beat.
API reference
Components
<ConfettiPiece />
Renders and plays one confetti particle.
<Confetti />
Pointer-events-none layer that fires celebration bursts on demand.
particleCount?
How many pieces each burst spawns. Default 30.
spread?
Launch cone width in degrees. Default 90.
startVelocity?
Initial particle speed. Default 20.
colors?
Live CSS colour values for the burst.
className?
Merged onto the burst layer.
ref?
Imperative handle exposing burst().
Functions
buildConfettiParticles
Builds confetti particles with pre-computed keyframe tracks.
buildConfettiParticles(particleCount: number, spread: number, startVelocity: number, colors: readonly string[] = CONFETTI_COLORS): ConfettiParticleData[]computeConfettiKeyframes
Simulates one particle's flight and samples keyframes.
computeConfettiKeyframes(params: {
angle: number
startVelocity: number
decay: number
gravity: number
drift: number
wobbleSpeed: number
wobbleOffset: number
size: number
ticks: number
tiltRotations: number
rotation: number
}): DOMKeyframesDefinitionFeatured in
See the confetti composed into full sections.


