Animations
Confetti
Canvas confetti burst triggered by a button click.
Quick Preview
Installation
npm install canvas-confetti
// Copy component fromsrc/components/animations/Confetti.tsx
Usage
import Confetti from '@/components/animations/Confetti'// Default burst on click<Confetti />// Custom trigger label<Confetti trigger="๐ Celebrate!" />
Examples
Brand Colors
Top Origin
Prompt Preview
Copy a prompt that recreates this UI
Paste this into your AI coding assistant to generate code that closely matches the reference, including color, size, shape, typography, spacing, and polish.
Copy-ready AI prompt
Starts from the current visual reference and project constraints.
Tweak only product-specific copy or data after the first generation pass.
Props
| Prop | Type | Default | Description |
|---|---|---|---|
trigger | React.ReactNode | - | Custom trigger label |
colors | string[] | - | Confetti colors array |
particleCount | number | 120 | Number of particles |
spread | number | 80 | Spread angle in degrees |
origin | { x?: number; y?: number } | { y: 0.6 } | Canvas origin point (0โ1) |
className | string | - | Additional CSS classes |