Skip to content
Haze UI

Boarding Pass

A wide airline boarding pass card with route hero, 4-column boarding metadata, clipped perforation notches, and barcode footer.

pnpm dlx shadcn@latest add @haze/boarding-pass
Open preview in a new tab
Liveno JavaScript

When to use

  • Presenting a confirmed flight itinerary with gate, boarding time, seat, group, and scannable pass stub.
  • Showing a crisp digital travel ticket or event pass with structured departure metadata.

When not to use

  • Users need to compare multiple itineraries side by side. Use a table or card list.
  • The record is generic key-value data without a route or ticket stub. Use description-list.

Installation

Add the Haze registry to components.json once, then install Boarding Pass with the shadcn CLI. Works in any Astro project with Tailwind CSS v4.

pnpm dlx shadcn@latest add @haze/boarding-pass
First time? Registry and theme setup

1. Add to components.json:

{
  "registries": {
    "@haze": "http://localhost:4329/r/{name}.json"
  }
}

2. Install the theme once: npx shadcn@latest add @haze/theme, then import it after Tailwind in your global CSS:@import "./haze.css";

API reference

PropTypeDefaultDescription
airlinestring"Bramble"Carrier or issuer name displayed in the pass top bar.
flightNumberstring"NW 214"Flight number displayed beside the airline name.
statusstring"On time"Live flight status badge label.
departureCodestring"LIS"Three-letter departure IATA airport code.
departureCitystring"Lisbon"Departure city name.
departureTimestring"10:40"Scheduled departure time.
arrivalCodestring"CPH"Three-letter arrival IATA airport code.
arrivalCitystring"Copenhagen"Arrival city name.
arrivalTimestring"15:05"Scheduled arrival time.
gatestring"B12"Departure gate assignment.
boardingTimestring"10:05"Gate boarding time.
seatstring"14A"Assigned seat code.
boardingGroupstring"2"Boarding group or zone number.
datestring"Thu, 12 Nov"Travel date displayed in the notice and passenger stub.
noticestring"Doors close 15 min before departure"Boarding cutoff notice line.
passengerstring"Maya Chen"Passenger full name in the barcode footer.
passCodestring"NW0214-LISCPH-14A"Seed string used to generate the deterministic barcode pattern.
headingLevel2 | 3 | 43Heading level for the airline title.
classstring–Additional classes on the outer boarding pass card.

Accessibility

  • The airline mark, flight path graphic, perforation cutouts, and SVG barcode are marked aria-hidden so screen readers focus on real flight text.
  • Gate, boarding time, seat, and boarding group are structured inside a semantic definition list.
  • Perforation cutouts are clipped inside overflow-hidden to keep horizontal layout intact down to 320px viewports.

Notes for AI

Copy into Claude Code, Cursor, Codex or any coding agent. Agents can also read the Markdown version of this page.

  • Install and use

    Install the Haze UI component "Boarding Pass" with `npx shadcn@latest add @haze/boarding-pass`. If components.json has no "@haze" registry yet, add "registries": { "@haze": "http://localhost:4329/r/{name}.json" }. If src/styles/haze.css does not exist yet, run `npx shadcn@latest add @haze/theme` once and import it from the global stylesheet after Tailwind. The CLI stops at an overwrite question when a Haze file already exists and differs, even with --yes, and then installs nothing after it: read its output. If the user has not edited their Haze files, re-run with --overwrite to take the registry versions; if they have, ask them before overwriting. Then import BoardingPass from "@/components/haze/ui/boarding-pass.astro" (or the relative path) and render it where it fits the page. Keep Haze token classes (bg-background, text-muted-foreground, border-border...) and never hardcode colors. Docs: http://localhost:4329/ui/boarding-pass.md

  • Customize with real content

    Adapt the Haze boarding-pass ui for our product. Replace the demo values of these props with our real content: airline, flightNumber, status, departureCode, departureCity, departureTime, arrivalCode, arrivalCity, arrivalTime, gate, boardingTime, seat, boardingGroup, date, notice, passenger, passCode, headingLevel, class. Keep the layout, the heading level rules and these accessibility details: The airline mark, flight path graphic, perforation cutouts, and SVG barcode are marked aria-hidden so screen readers focus on real flight text. Gate, boarding time, seat, and boarding group are structured inside a semantic definition list. Perforation cutouts are clipped inside overflow-hidden to keep horizontal layout intact down to 320px viewports. Do not add raw color classes; use the Haze tokens.

  • Choose the right block

    Before using boarding-pass, check it fits: use it when presenting a confirmed flight itinerary with gate, boarding time, seat, group, and scannable pass stub.; showing a crisp digital travel ticket or event pass with structured departure metadata.. Avoid it when users need to compare multiple itineraries side by side. use a table or card list.; the record is generic key-value data without a route or ticket stub. use description-list.. Alternatives: @haze/card, @haze/description-list.

Dependencies

  • npm: @lucide/astro
  • @haze/utils
  • @haze/theme (one-time setup)

Source · Original Haze UI work.

Catalog

↑↓ moveEnter openEsc close

Keyboard shortcuts

CtrlK
Command palette
/
Focus search
←↑→↓
Move between cards
jk
Next / previous card
ci
Copy code / install command (detail page)
[]
Previous / next entry
?
This help
Esc
Close dialog