Carregando…
Carregando…
Carregando…Button that triggers a confetti particle burst on click, with intent and size.
Confetti Button — canvas confetti burst on click
$ npx kikitocn add confetti-button@/lib/utilsimport { ConfettiButton } from "@/components/ui/cn/confetti-button/ConfettiButton";
export function ConfettiButtonExample() {
return (
<ConfettiButton />
);
}| Prop | Tipo | Padrão | Descrição |
|---|---|---|---|
children* | ReactNode | — | Conteúdo do botão |
onClick | () => void | undefined | Callback adicional ao clicar |
particleCount | number | 60 | Número de partículas de confetti |
spread | number | 70 | Ângulo de dispersão das partículas |
intent | 'primary' | 'secondary' | 'danger' | 'success' | 'warning' | 'primary' | Cor do botão |
size | 'sm' | 'md' | 'lg' | 'md' | Tamanho do botão |
disabled | boolean | false | Desabilita o botão |