Installation
Usage
Props
TheParticleButton component extends all standard HTML button props and includes:
| Prop | Type | Default | Description |
|---|---|---|---|
onSuccess | () => void | undefined | Callback function triggered on successful click |
successDuration | number | 1000 | Duration in milliseconds for the particle animation |
children | ReactNode | - | Button content |
className | string | - | Additional CSS classes |
Dependencies
motion/react(Framer Motion) - For particle animationslucide-react- For the MousePointerClick icon@/components/ui/button- Base button component@/lib/utils- Utility functions (cn)
Features
- Particle explosion animation on click
- Customizable animation duration
- Success callback support
- Scale animation on interaction
- Dark mode support