Ticket stub
A ticket with a perforated stub. Checking in tears the stub off along the perforation, so used is something you can see on the ticket and not only read. The tear is the feedback; the plain text line on the ticket is the record.
Gate check-in, Platform 3
Mira Solheim · Friday 23 October
Press Check in, or pull the stub down.
When to use
- Check-in, redeem and validate flows that cannot be repeated by accident.
- Showing that a booking, coupon or pass has been used.
When not to use
- Reversible toggles; use a switch.
- Anything that must stay readable for years; the ticket is a status, not an archive.
Installation
pnpm dlx shadcn@latest add @caliper/ticket-stub
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
TicketStub
19 props
Keyboard
- No custom key handling; Tab and the native activation keys do the work.
Accessibility
It exposes group semantics, with aria-label, aria-hidden and aria-live 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/ticket-stub.mdThe index of every part is at /llms.txt.