Gift box
A wrapped gift for rewards, referral credit and welcome offers. It wobbles on hover; opening lifts the lid off with a small hop, pops the bow and raises the reward from inside.
20% off your first order
Code WELCOME20
When to use
- Welcome offers, referral rewards, achievements.
- Any single reward that should be discovered rather than shown.
When not to use
- Rewards people must see to decide; show those up front.
- Repeated on every visit.
Installation
pnpm dlx shadcn@latest add @caliper/gift-box
Adds its 2 files to components/ui/, each with its own stylesheet, and installs their packages. Pro installs with your access token, set up once per project. See Pro access. The first part also adds Caliper UI’s tokens; import them once as in Installation.
API reference
GiftBox
4 props
Also accepts the native props of its root element and a ref.
Keyboard
- No custom key handling; Tab and the native activation keys do the work.
Accessibility
It exposes region semantics, with aria-label, aria-expanded and aria-controls kept in step with state.
Notes for AI
Give your coding assistant this page as Markdown instead of screenshots: the props, keyboard and examples in one file.
/docs/components/gift-box.mdThe index of every part is at /llms.txt.