Loading preview
Animated Card
CardsA card that tilts in 3D toward the pointer with spring physics.
A wrapped gift that pops its lid with confetti and reveals a coupon code with a copy button.
npx shadcn@latest add @venusui/gift-boxRun 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/gift-box.tsxThe code behind the preview above.
gift-box-demo.tsx
import { GiftBox } from "@/components/ui/gift-box"
export default function GiftBoxDemo() {
return <GiftBox code="THANKS15" reward="15% off your next order" />
}
| Prop | Type | Default | Description |
|---|---|---|---|
| code | string | — | The coupon code revealed inside. |
| reward | string | — | What it gets you, e.g. “15% off your next order”. |
| color | string | oklch(0.62 0.2 15) | Box color: any CSS color; the lid is a shade darker and the ribbon stays gold. |
| onOpen | () => void | — | Called when the gift is opened. |
All <div> props.
lucide-react for the copy icon. React 19 and Tailwind CSS v4. The CLI adds the gift-box-confetti keyframes.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.