Basic

Add data-bs-toggle="confetti" to a button. A click pours the shower; it thins out and clears by itself.

Amount and length

Set data-bs-count for the number of pieces and data-bs-duration for how long they keep pouring, in milliseconds.

Colors

By default the pieces use the Tabler palette. Pass a comma-separated list in data-bs-colors to use your own.

Speed

Set data-bs-speed to scale the fall. 1 is the default, a lower value floats, a higher one drops.

Target and events

Point data-bs-target at another element. start.bs.confetti and end.bs.confetti fire on that element, not on the trigger.

Idle

From JavaScript

Call burst() on a tabler.Confetti instance when something else finishes, for example a form that was saved.