Confetti Burst Button
A celebratory primary action: the label rolls to a check while a cone of paper confetti (or your own glyphs) bursts from the button with real drag, gravity and tumble. The canvas exists only while particles do.
Try it: Press it (or Enter / Space) to celebrate.
Installation
Install with the shadcn CLI:
npx shadcn@latest add https://www.framekitui.live/r/confetti-burst-button.jsonOr, with the @framekit namespace registered: npx shadcn@latest add @framekit/confetti-burst-button. You can also copy the source into components/ui/confetti-burst-button.tsx (view on GitHub).
Usage
import { ConfettiBurstButton } from '@/components/ui/confetti-burst-button'Props
| Prop | Type | Default | Notes |
|---|---|---|---|
label / doneLabel | string | 'Mark as shipped' / 'Shipped' | Idle and done labels (done is announced). |
colors | string[] | lilac, amber, mint, pink | Confetti colours. |
count | number | 110 | Particles per burst (12–220). |
spread | number | 70 | Cone width in degrees (20–360). |
glyphs | string[] | — | Throw glyphs or emoji instead of paper, e.g. ['✦', '❤']. |
resetAfter | number | 2600 | ms before returning to idle; 0 stays done. |
icon | ReactNode | — | Idle icon (defaults to a party popper). |
onBurst | () => void | — | Fires on press. |
className | string | — | Extra classes merged onto the button. |
Dependencies
motionlucide-react
Related Buttons components
- Wax Seal Button
A paper-and-ink send button: press it and a drop of wax falls into the slot and spreads into an uneven puddle, a brass stamp thumps down and lifts away leaving an embossed monogram, and the label…
- Radial Share Menu
Share pill folds into a close button while channel bubbles spring out on an arc; the pick glides to centre, becomes a check and really copies the link.
- Googly Gaze Button
Eyes track the cursor and smirk on click.
- Cloud Launch Publish Button
The arrow launches out of the cloud on a puff of vapour, a progress seam draws along the bottom edge, and a check drops back into the cloud.
- Slide Confirm Button
Drag the knob (or press Enter) to confirm.
- Shredder Delete Button
Pill holds still while its icon works: the lid flips, a sheet feeds in, paper ribbons tumble out below and a tally counts each shred.