Card vault
A virtual card screen. The number lives on the back: the card flips only after a passcode and turns itself back over after 15 seconds. Freezing tilts the card back and frosts it. The details are not on the page at all until they are revealed.
Team travel card
Mira Solheim’s virtual card for the Porto offsite
Card details
The number, expiry and CVC stay hidden until you confirm it is you.
- Halden Rail$38.50
- Notion$16
- Fly Air Porto · return flights$184.20
- Cafe Lumen$6.40
When to use
- Showing a payment card's number, expiry and CVC behind a step-up.
- Any sensitive reveal that should be visible as a state, not a hidden toggle.
When not to use
- Storing or passing card data around the page. Fetch it in onReveal and let the part drop it.
- Secrets that are not shown on a card; use the secret field.
Installation
pnpm dlx shadcn@latest add @caliper/card-vault
Adds its 7 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
CardVault
15 props
Keyboard
- No custom key handling; Tab and the native activation keys do the work.
Accessibility
It exposes group, alert, timer and meter semantics, with aria-label, aria-hidden, aria-invalid, aria-describedby, aria-valuemin and aria-valuemax kept in step with state. Changes that matter are announced through a live region.
Notes for AI
Give your coding assistant this page as Markdown instead of screenshots: the props, keyboard and examples in one file.
/docs/components/card-vault.mdThe index of every part is at /llms.txt.