All components
Like Button
ButtonsA heart that pops and bursts particles when liked.
Installation
Add it with the shadcn CLI:
$
pnpm dlx shadcn@latest add https://nawalkattel.com.np/r/like-button.jsonOr install manually
1. Install dependencies
pnpm add motion clsx tailwind-merge lucide-react2. Copy the component source into
components/library/like-button.tsx
Props
| Prop | Type | Default | Description |
|---|---|---|---|
| className | string | - | Classes applied to the button. |
Accessibility
- aria-pressed exposes the liked state to assistive tech.
- Carries an aria-label, since the control is icon-only.
- Particles are pointer-events-none and never block clicks.
Dependencies
motionclsxtailwind-mergelucide-react