Loading preview
Animated Card
CardsA card that tilts in 3D toward the pointer with spring physics.
A heart toggle that pops and bursts when liked, with an optional count.
npx shadcn@latest add @venusui/like-buttonRun this in a project set up with shadcn. If you haven’t set it up yet, run npx shadcn@latest init first.
Paths use the default shadcn aliases. The CLI follows the aliases in your components.json.
@/components/ui/like-button.tsxThe code behind the preview above.
like-button-demo.tsx
import { LikeButton } from "@/components/ui/like-button"
export default function LikeButtonDemo() {
return <LikeButton label="Like this post" count={128} />
}
| Prop | Type | Default | Description |
|---|---|---|---|
| liked | boolean | — | Controlled state. |
| defaultLiked | boolean | false | Initial state. |
| onLikedChange | (liked: boolean) => void | — | Called on toggle. |
| count | number | — | Count shown beside the heart; adjusts by one on toggle. |
| label | string | "Like" | Accessible name, e.g. “Like this post”. |
All <button> props except onChange.
lucide-react, React 19 and Tailwind CSS v4. The CLI adds the keyframes.onLikedChange and roll back if the request fails.aria-pressed. The burst is decorative and skipped with reduced motion.count and let the button adjust it, or control both yourself.Unknown registry "@venusui"npx shadcn@latest), install by URL, or register it with its address: npx shadcn@latest registry add @venusui=https://venusui.com/r/{name}.json.No components.json foundnpx shadcn@latest init in your project first.A card that tilts in 3D toward the pointer with spring physics.
A lens with a working iris: blades close to the chosen aperture and snap shut when you release the shutter.
Stacked cards with the next ones peeking out; Next sends the top card to the back.