Pro
Stamp card
A loyalty card with a stamp in each place. A new stamp lands oversize, settles into its place at a fixed tilt and sends one ring out, as a rubber stamp does. A last place shows the reward and lights when the card is full.
pnpm dlx shadcn@latest add @caliper/stamp-cardWhen to use
Use it for
- Coffee, salon and retail loyalty programmes.
- Any "collect nine, get one" mechanic.
Skip it when
- Points that run into the hundreds; use `UsageMeter`.
- Cards that expire without saying so beside the card.
Decisions
Why it is built this way, so you know what to keep when you change your copy.
Behaviour
- Only new stamps animate
- Stamps already on the card stay still when the page loads or the card re-renders; only a stamp added now thumps in.
Styling
- A fixed tilt per place
- Each place has its own small tilt, so a card always looks hand-stamped the same way and never jitters.
Usage
- A meter with the reward in words
- It is a meter whose value text says how many are collected and what the reward is.
Installation
pnpm dlx shadcn@latest add @caliper/stamp-card
Adds its 3 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.
Usage
Import it from your copy of the source. The example behind the preview comes with the source. It is built from StampCard and stampTilt.
import { StampCard, stampTilt } from "@/components/ui/stamp-card"
The worked example comes with Pro
The 33-line example behind the preview opens here, ready to copy.
- 626 Pro parts, blocks and page templates, all with source
- $149 once, with lifetime updates. No renewal
- A full refund within 14 days if it is not for you
API reference
StampCard
component
Also accepts the native props of its root element and a ref.
stampTilt
component
No props of its own; it accepts the native props of its root element.
Accessibility
It exposes meter semantics, with aria-label, aria-valuemin, aria-valuemax, aria-valuenow, aria-valuetext and aria-hidden kept in step with state.
No custom key handling; Tab and the native activation keys do the work.
Motion
Transitions use the shared duration and easing tokens. Under prefers-reduced-motion those tokens collapse to instant and travel distances go to zero, so state changes still happen without movement.
Related
- Wallet cardA payment card with brand, last four digits and actions.
- Premium cardA refined card with edge light for featured offers.
- Celebration burstOne small burst of confetti when a real milestone completes: the first deploy, a finished setup, a paid invoice. Skipped under reduced motion; the words say what happened.