Flight Booking
A list of flight result cards showing airline, times, duration, stop count, and baggage info. A shared Economy/Business/First fare-class switcher above the list changes the displayed price on every card at once, since each flight's demo data carries a price per class.
Docs
Installation
A real shadcn registry command, not a copy-paste stand-in: it fetches this block plus its button, badge, avatar-initials dependencies and any missing npm packages, and installs them straight into your project.
npx shadcn add https://staaarter.com/r/flight-booking.jsonPrefer not to use the CLI? Copy the source from the Code toggle above into src/components/blocks/booking/booking8.tsx instead.
Usage
The file also exports booking8Demo, the exact props behind the preview above. Spread it to get a working section in one line, then replace it with your own data.
import { Booking8, booking8Demo } from "@/components/blocks/booking/booking8"; export default function Page() { return <Booking8 {...booking8Demo} />; }
Props
| Prop | Type | Default | Description |
|---|---|---|---|
| heading | string | "Choose your flight" | Section heading. |
| description | string | "Prices update instantly based on the fare class you select." | Short subheading under the heading. |
| flights | FlightResult[] | none | Flight results to list, each with a price per fare class. |
| className | string | none | Extra classes for the outer section element. |
Types
interface FlightResult { id: string; airline: string; flightNumber: string; departTime: string; departAirport: string; arriveTime: string; arriveAirport: string; duration: string; stops: "Nonstop" | "1 stop"; baggage: string; price: { economy: number; business: number; first: number }; }
Behavior notes
- The Economy/Business/First pill switcher is real shared client state: selecting a class re-renders the displayed price on every flight card at once from that flight's per-class price data.
- Each flight card's "Select" button is decorative only, nothing is booked or sent anywhere.
More Booking Blocks
View all →date-time-picker
Date & Time Picker
Split-panel scheduler: a real monthly calendar on the left, morning/afternoon time slots on the right, and a live booking summary footer.
reservation-summary
Reservation Summary
A static booking confirmation card with service, date/time, provider avatar, price breakdown, promo code field, and cancellation policy.
appointment-list
Appointment List
Upcoming and past appointments grouped by date, with provider avatar, status badge, and reschedule/cancel actions.
service-selector
Service Selector
Category-tabbed grid of bookable services with icon, description, duration, and price.
provider-picker
Provider Picker
A selectable grid of staff/provider cards with rating, reviews, availability, and an Any Provider fallback.
restaurant-reservation
Restaurant Reservation
Table reservation form with a guest stepper, date/time inputs, seating pills, and a live summary panel.