Koala logo Design
Esc
No matches for “
↑↓ navigate open Esc close
Components Confetti

Confetti

Canvas-based celebration. Rectangular pieces fall with rotation and drift, then fade. Use once per achievement — quote accepted, transaction created — never for routine saves.

showConfetti(n)

Canonical

Click to fire. showConfetti(n) drops a canvas over the viewport, animates n rectangular pieces, and removes itself when they fade.

Variants

4 piece counts
Small win
showConfetti(50)
Confirmation
showConfetti(100)
Default
showConfetti(200)
Big moment
showConfetti(400)

States

2 states
Resting
Playing

Props

1 parameter
Parameter Type Notes
pieceCountnumber (default 200)How many pieces to render. 200 is the default; pick higher for once-a-year moments only.

Do & don't

Do Fire once on a real achievement — quote accepted, transaction completed. The user remembers it.
Don't Don't fire on routine saves, toggles, or every page load. Confetti everywhere reads as confetti nowhere.