Boarding Pass - React Component | Kokonut UI
Boarding Pass
A boarding pass that keeps itself current. When the gate or times change, only the changed characters roll over, the old value struck through.
Install with npx shadcn@latest add https://kokonutui.com/r/boarding-pass.json, then show me how to use it.
Installation
Boarding Pass is a free, open-source React component in the Kokonut UI Cards collection. Add it with the shadcn CLI, which copies the source into components/kokonutui/boarding-pass.tsx, so the code is yours to change.
npx shadcn@latest add @kokonutui/boarding-pass
Or add it by hand: install its packages, then copy the source from above into components/kokonutui/boarding-pass.tsx.
npm install lucide-react motion
Usage
import BoardingPass from "@/components/kokonutui/boarding-pass";
export default function Example() {
return <BoardingPass />;
}
Props
flight
Flight
Leave out to watch a demo flight get a gate change and a delay.
className
string
Extra classes for the root element.
Flight
airlinerequiredstringnumberrequiredstringfromrequired{ code: string; city: string; time: string }torequired{ code: string; city: string; time: string }daterequiredstringgaterequiredstringboardsrequiredstringseatrequiredstringgrouprequiredstringpassengerrequiredstringstatusrequiredFlightStatusnotestringOne line under the status, like "Delayed 25 min".
FlightStatus
type FlightStatus = "on-time" | "delayed" | "gate-change" | "boarding";
Dependencies
| Needs | Version | Comes from |
|---|---|---|
lucide-react |
^0.556.0 |
npm, installed by the CLI |
motion |
^12.23.25 |
npm, installed by the CLI |
cn from lib/utils.ts |
shadcn init | |
| React | 19 |
Your app |
| Tailwind CSS | 4 |
Your app |
No provider, font or global CSS to set up: the file works as soon as it lands.