Confetti Button

Motion

A React button that bursts confetti from itself on click, with gravity, drag and spin on a temporary canvas. No library, and skipped for reduced motion.

src/registry/premium/confetti-button.tsx/r/confetti-button.json

Installation#

bash
npx shadcn@latest add https://ui.minidev.pro/r/confetti-button.json

Usage#

tsx
import { ConfettiButton } from "@/components/ui/confetti-button"

export function Example() {
  return <ConfettiButton />
}

API reference#

ConfettiButton props
PropTypeDefault
countnumber70
colorsstring[]-

Also accepts every prop of <button>, passed through to the root element.

Dependencies#

npm

lucide-reactmotion

Built from

No other MiniDev files
All Animated React components