Docs
Confetti button
Confetti button
A fun and interactive button that triggers a confetti explosion effect on click.
Installation
pnpm dlx shadcn@latest add to-setup
Usage
import { ConfettiButton } from "@/components/ui/confetti-button";
<ConfettiButton>Button</ConfettiButton>
Props
confetti-button
props.
Prop | Type | Description | Default |
---|---|---|---|
children | React.ReactNode | The content inside the button. | (required) |
className | string | Additional custom classes for styling. | - |
angle | number | The direction in which the confetti is fired, in degrees. | 90 |
particleCount | number | The number of confetti particles emitted on click. | 75 |
startVelocity | number | The initial velocity of the confetti particles. | 35 |
spread | number | The spread angle of the confetti explosion. | 70 |