Updated
Boarding Pass
ProCustomize
Tear angle14°
Installation
ProBoarding Pass is a Pro component
Sign in to see the source, or install it with a license key. The live preview and props above are free to explore.
Install with a key
- Add the Pro registry to
components.json:components.json { "registries": { "@uibrik-pro": { "url": "https://uibrik.com/r/pro/{name}.json", "headers": { "Authorization": "Bearer ${UIBRIK_LICENSE}" } } } } - Put your key in
.env.localand add that file to.gitignore:.env.local UIBRIK_LICENSE=your-license-key - Install it:
Terminal npx shadcn@latest add @uibrik-pro/boarding-pass
Loading your installation…
Usage
import { BoardingPass } from "@/components/uibrik/boarding-pass/boarding-pass";<BoardingPass from="SFO" to="JFK" passenger="Maya Chen" flight="UB 204" gate="B12" seat="14A" tearAngle={14} fromCity="San Francisco" toCity="New York" date="14 Oct" boarding="09:40" torn={false} defaultTorn={false} onTornChange={(torn) => {}}/>Where to use Boarding Pass
Travel and ticketing apps
Tearing the stub off along its perforation makes check-in feel like handling a real ticket.
Booking confirmations
The checked-in mark left after the tear is a clear, satisfying end to a booking flow.
Pairs with Status Stamp
Event registration
A ticket you pull apart turns a registration success screen into something attendees remember.
Props
BoardingPass- from
- Type string
- "SFO"
- Departure airport code.
- to
- Type string
- "JFK"
- Arrival airport code.
- passenger
- Type string
- "Maya Chen"
- Passenger name.
- flight
- Type string
- "UB 204"
- Flight number.
- gate
- Type string
- "B12"
- Boarding gate.
- seat
- Type string
- "14A"
- Seat, printed large on the stub.
- tearAngle
- Type number
- 14
- How far the stub swings by the time the last bridge breaks.
- fromCity
- Type string
- "San Francisco"
- City under the departure code.
- toCity
- Type string
- "New York"
- City under the arrival code.
- date
- Type string
- "14 Oct"
- Shown top right until the stub is torn.
- boarding
- Type string
- "09:40"
- Boarding time.
- torn
- Type boolean
- –
- Torn state, when controlled.
- defaultTorn
- Type boolean
- false
- Initial torn state when uncontrolled.
- onTornChange
- Type (torn: boolean) => void
- –
- Called when the stub is torn.
- className
- Type string
- –
- Classes for the wrapper.