Click the preview button
Watch confetti particles burst outward and fade from the click point.
Build a button that bursts colorful confetti on click. Tune the count and colors, then copy the ready-to-use snippet.
Watch confetti particles burst outward and fade from the click point.
Adjust particle count and the button's base color to match your design.
Get self-contained HTML, CSS and JavaScript ready to paste into your project.
On click, a small script creates several colored particle elements at the click point and animates each one to a random offset and rotation with CSS, then removes them once the animation ends.
A moderate particle count (20-40) animates smoothly on most devices. Very high counts on many buttons at once can affect performance, so test on the devices you care about.
Yes. The JavaScript snippet listens for a click event and can be attached to any element, not only a button.