Confetti Button
Button that fires a confetti burst on click
A celebratory button that launches a confetti burst from its center when clicked. Uses canvas-confetti under the hood with configurable particle count and spread.
Preview
One task left
9 of 10 launch checks passed.
Installation
Install the component using the CLI.
npx shadcn@latest add https://rohan.run/r/confetti-button.jsonUsage
Import the component:
import { ConfettiButton } from "@/components/rohan/confetti-button"Use it in your code:
<ConfettiButton>Celebrate</ConfettiButton>Props
| Property | Type | Default | Description |
|---|---|---|---|
| children | ReactNode | "Celebrate" | Button label or content. |
| particleCount | number | 100 | Number of confetti particles per burst. |
| spread | number | 70 | Spread angle of the burst in degrees. |
| className | string | — | Optional CSS classes for the button. |