Skip to content
WunderUI
All effectsButton

Confetti

A short burst of confetti for a moment worth celebrating, like a finished setup or a first sale.

Pure CSSButton

Meant for

ButtonDialogEmpty State

Usage

On a Button

Click it. A burst for a rare moment — a first publish, a goal reached — so it fires once, when the pieces are rendered, and again when you restart it. Pieces launch on their own angle, rotating as they rise and fading at the top. Angle, colour and delay come from a property per piece — the class holds one keyframe for all of them. Every child of the class is a piece, so the confetti gets its own layer in the button's grid cell — tucked behind it with -z-10, so the pieces launch from behind the button instead of crossing its label.

The class is wm wm-confetti — the first half is the marker the trigger and reduced-motion rules hook into, the second is the effect.