Kinetik UI

Boarding Pass

.md

A paper boarding pass with real notches: tap the barcode to scan it and the stub tears off with a stamp.

v1.0.0Live on web@shopify/react-native-skiareact-native-reanimatedreact-native-svgreact-native-worklets
Component preview

Installation

Kinetik CLI
npx kinetik-ui add boarding-pass

The CLI copies the source and installs native dependencies with npx expo install, so versions match your Expo SDK. With shadcn: npx shadcn@latest add https://kinetik-ui.dev/r/boarding-pass.json

Install manually

  1. Install dependencies
    npx expo install @shopify/react-native-skia react-native-reanimated react-native-svg react-native-worklets
  2. Copy the source files
    • components/kinetik/boarding-pass.tsx
    View source files

Usage

import { BoardingPass } from '@/components/kinetik/boarding-pass';

<BoardingPass
  airline="Northwind"
  flight="KN 1321"
  cabin="Premium"
  booking="AG7890"
  from={{ code: 'CDG', city: 'Paris', time: '14:30' }}
  to={{ code: 'JFK', city: 'New York', time: '17:45' }}
  duration="8h 15m"
  passenger="Olivia Bennett"
  details={[
    { label: 'Gate', value: 'B12' },
    { label: 'Seat', value: '12A' },
  ]}
  onScan={checkIn}
/>;

When to use

  • Showing a ticket, pass or booking that the user presents or checks in with.

When not to use

  • As a real scannable code: the barcode is a decorative pattern. Render a real barcode or QR code for gates.

Notes

  • The notches are cut out of the ticket shape, so the pass sits on any background.
  • The pass is paper-white on both themes. accent colours the striped band.
  • Without onScan the stub is not a button. boarded starts the pass already torn and stamped.
  • barcodeBars(code) is exported: the same code always draws the same pattern.

Props

BoardingPassProps

PropTypeDefaultDescription
airlinerequiredstring—
flightrequiredstring—Flight number under the airline.
fromrequiredPassStop—
torequiredPassStop—
durationrequiredstring—Flight time in the chip between the codes, e.g. "3h 15m".
passengerrequiredstring—
detailsrequiredreadonly PassDetail[]—The row of small facts: departure, terminal, gate, seat.
brandstring'Kinetik Air'Name and mark at the top. Defaults to "Kinetik Air".
cabinstring—Cabin on the right, e.g. "Premium".
bookingstring—Booking reference under the cabin.
passengerLabelstring'Passenger name'Label above the passenger. Defaults to "Passenger name".
codestring—Encoded in the barcode's pattern. Defaults to the booking and flight.
boardedbooleanfalseStart already boarded: the stub torn and stamped.
onScan() => void—Called when the barcode is tapped and scanned. Without it the stub is not a button.
accentstring'hsl(243, 88%, 68%)'Colour of the striped band.
hapticsbooleantrueHaptics on scan. Defaults to true.
styleStyleProp<ViewStyle>—

Performance and accessibility

Performance

Budget
The ticket shape is built once per size; the band slides in on arrival and the scan runs one UI-thread timing and spring. Nothing animates at rest.
Measured

Pixel 9 emulator, API 35, release build · interaction median 1.35× the system Settings app on the same emulator (indicative only) · no frames drawn at rest · 158 MB app memory. Measured during scans (scanner line with a blurred glow, then the stub tearing). Frame stats put app work at about 2 ms and render-thread work at 1 ms a frame; the rest is the emulator waiting on its virtual GPU.

Real-device measurement pending.

Accessibility

Reduced motion
The pass appears in place and a scan tears and stamps the stub at once, with no scanner line.
Screen readers
The pass reads as one summary (route, times, passenger, gate and seat); the barcode is a button that becomes "Boarded".
Touch target
The whole stub, 112 pt tall, is the scan button.

Source files

components/kinetik/boarding-pass.tsx is in the Code tab of the preview above.