Skip to content
caliper ui docs

Pro

Live pass

A credential card with a foil you check by tilting it. A sheen follows the mouse and a VERIFIED mark only shows once the card is tilted far enough, as security foil does on a banknote. A screenshot cannot show it, and the line beneath keeps a ticking clock, so a still image of the pass is obviously stale.

Pro
pnpm dlx shadcn@latest add @caliper/live-pass

Halden Library entry

Show the front desk your member pass

Halden LibraryMember
Mira Solheim
ID 4821 0092Valid to 09/28

Tilt the pass to check the foil · live --:--:--

Front desk has not logged a visit today

Installs components/ui/live-pass.tsxDepends on @radix-ui/react-slot, lucide-reactMotion honours reduced motion

When to use

Use it for

  • Member, event and access passes where showing it is live matters.
  • Demonstrating tilt-aware materials in product marketing.

Skip it when

  • Real security. This is a visible cue, not verification; check credentials on the server.
  • Anywhere the card text must stay perfectly still.

Decisions

Why it is built this way, so you know what to keep when you change your copy.

Behaviour

Motion only when pressed
On a phone a button turns on device motion and, where the platform needs it, asks permission then. Nothing is requested on load.
Keyboard tilts it
Focus the card and press the arrow keys to tilt, Home to level. Under reduced motion the foil and mark are shown still and complete, with a note.

Usage

The credential is always text
Name, ID and expiry are real text outside the effect. The mark and foil are decoration; the live line says when the foil was checked.

Installation

terminal
pnpm dlx shadcn@latest add @caliper/live-pass

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.

Usage

Import it from your copy of the source. The example behind the preview comes with the source.

example.tsx
import { LivePass } from "@/components/ui/live-pass"

The worked example comes with Pro

The 17-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
Checking your licence…

API reference

LivePass

component
PropTypeDefaultDescription
title *string—The issuer, for example "Halden Library".
kindstring"Member"What the holder is, shown top right.
name *string—The holder. A long name wraps on the card.
id *string—
validTo *string—
onChecked((at: Date) => void)—Called once, the first time the card is tilted far enough to see the mark.
statusDepthStatus"ready"
messagesDepthMessages—
onRetry(() => void)—
disabledboolean—
classNamestring—

Accessibility

It exposes group semantics, with aria-label, aria-hidden, aria-live and aria-pressed kept in step with state. Changes that matter are announced through a live region.

KeyBehaviour
←Moves to the previous item or value.
→Moves to the next item or value.
↑Moves to the previous item or value.
↓Moves to the next item or value.
HomeJumps to the first item or the minimum.

Motion

It checks prefers-reduced-motion itself and settles immediately instead of travelling. Every state is still reachable.

All Surfaces examples