Skip to content
caliper ui pro docs

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.

Pro

When to use

  • Coffee, salon and retail loyalty programmes.
  • Any "collect nine, get one" mechanic.

When not to use

  • Points that run into the hundreds; use `UsageMeter`.
  • Cards that expire without saying so beside the card.

Installation

terminal
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.

API reference

StampCard

3 props

Also accepts the native props of its root element and a ref.

PropTypeDefaultDescription
stamps *number—Stamps collected so far.
totalnumber9Stamps the card holds. The reward gets one more place after them.
rewardstring"Free coffee"What the full card earns, e.g. "Free coffee".

stampTilt

0 props

No props of its own; it accepts the native props of its root element.

Keyboard

  • No custom key handling; Tab and the native activation keys do the work.

Accessibility

It exposes meter semantics, with aria-label, aria-valuemin, aria-valuemax, aria-valuenow, aria-valuetext and aria-hidden 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/stamp-card.md

The index of every part is at /llms.txt.

More in Surfaces