04.08 · Micro-Interactions
Success Confetti
Confetti bursts from the button when a task is done. Best for big moments.
Click it
Click or tap Place order (again for another burst), or press Show me.
Inside, the fan shows where the pieces are shot, the arrows the pull that brings them down, and the dashed lines a few of their paths. Click Place order, or press Show me.
Check only: the button turns green with a check; With confetti: pieces also shoot up from it, spin, fall and fade. Click Place order, or press Show me.
Try it
Change a setting, then try it again or press Show me.
Amount of confetti
More pieces look fuller but cost more on phones.
Spread
Narrow shoots up like a fountain; wide fills a dome.
Fall speed
How quickly the pieces fall back down.
Copy the prompt
Paste it into an AI assistant such as ChatGPT, Claude or Cursor to build this in your own project.
Add a confetti burst to [the action that completes something important, such as placing an order]. When it succeeds, turn the button into a clear success state with a check mark and a short confirmation, and fire small colored rectangles from the button: they shoot upward in a fan, spin, slow down, fall and fade. Save it for real milestones, not everyday clicks. Draw the pieces on one layer and stop drawing once the last one has faded or fallen out of view. If the visitor has reduced motion turned on, show the success state without the confetti. Match the settings listed below.
Your settings
Replace the words in brackets with your own element. Your settings are added at the end.
Free and open source. If this helped, a star on GitHub helps other people find it.
Star on GitHubWhat it is
The full explanation is in README.md.