Loading preview
Animated Card
CardsA card that tilts in 3D toward the pointer with spring physics.
A flight boarding pass with a perforated stub and code that flips to the fare and baggage details.
npx shadcn@latest add @venusui/boarding-passRun this in a project set up with shadcn. If you haven’t set it up yet, run npx shadcn@latest init first.
Paths use the default shadcn aliases. The CLI follows the aliases in your components.json.
@/components/ui/boarding-pass.tsxThe code behind the preview above.
boarding-pass-demo.tsx
import { BoardingPass } from "@/components/ui/boarding-pass"
// The airline and passenger are made up.
export default function BoardingPassDemo() {
return (
<BoardingPass
className="w-[min(22rem,calc(100vw-3rem))]"
airline="Skylark Air"
flight="SK 208"
from={{ code: "LHR", city: "London" }}
to={{ code: "HND", city: "Tokyo" }}
date="Tue, 7 Apr"
departs="19:05"
arrives="16:40 +1"
passenger="Priya Natarajan"
seat="24A"
gate="B32"
boarding="18:15"
cabin="Economy"
reference="K7PX2Q"
details={[
{ label: "Fare", value: "Economy Flex" },
{ label: "Checked bag", value: "1 × 23 kg" },
{ label: "Cabin bag", value: "1 × 10 kg" },
{ label: "Seat", value: "Window, extra legroom" },
{ label: "Meal", value: "Vegetarian" },
]}
/>
)
}
| Prop | Type | Default | Description |
|---|---|---|---|
| airline, flight | string | — | Shown in the header band. |
| from, to | { code: string; city: string } | — | Airports: IATA code and city. |
| date, departs, arrives | string | — | e.g. “Tue, 7 Apr”, “19:05”, “16:40 +1”. |
| passenger, seat, gate, boarding | string | — | The main fields. |
| cabin | string | "Economy" | Shown on the stub and the back. |
| reference | string | — | Booking reference, printed on the stub and drawn into the code. |
| details | { label: string; value: string }[] | — | Rows on the back, e.g. fare, baggage and meal. |
All <button> props except children; className sets the width (the pass is about 5:8).
lucide-react for the plane. React 19 and Tailwind CSS v4.aria-pressed; its label reads the flight, route, date, seat, gate and boarding time.overflow-hidden or filter). Keep the pass's wrapper free of those.Unknown registry "@venusui"npx shadcn@latest), install by URL, or register it with its address: npx shadcn@latest registry add @venusui=https://venusui.com/r/{name}.json.No components.json foundnpx shadcn@latest init in your project first.A card that tilts in 3D toward the pointer with spring physics.
Stacked cards with the next ones peeking out; Next sends the top card to the back.
A card that tilts toward the pointer while its layers rise off the surface, each to its own depth.