Ride Booking
A rideshare-style booking form: pickup/dropoff address inputs, a real Now/Later toggle that conditionally reveals a real datetime picker, clickable ride class cards (Economy/Comfort/XL) with real single-select state and ETA/fare, and a static payment method list with a default badge.
Docs
Installation
A real shadcn registry command, not a copy-paste stand-in: it fetches this block plus its button, badge dependencies and any missing npm packages, and installs them straight into your project.
npx shadcn add https://staaarter.com/r/ride-booking.jsonPrefer not to use the CLI? Copy the source from the Code toggle above into src/components/blocks/booking/booking17.tsx instead.
Usage
The file also exports booking17Demo, 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 { Booking17, booking17Demo } from "@/components/blocks/booking/booking17"; export default function Page() { return <Booking17 {...booking17Demo} />; }
Props
| Prop | Type | Default | Description |
|---|---|---|---|
| heading | string | "Request a ride" | Section heading. |
| rideClasses | RideClassOption[] | none | Selectable ride class options with ETA and fare. |
| paymentMethods | PaymentMethodOption[] | none | Static list of payment methods to display. |
| className | string | none | Extra classes for the outer section element. |
Types
interface RideClassOption { id: string; name: string; description: string; eta: string; fare: number; capacity: number; } interface PaymentMethodOption { id: string; label: string; detail: string; isDefault?: boolean; }
Behavior notes
- The Now/Later toggle is real client state; selecting "Later" conditionally renders a real native datetime-local input below it.
- Ride class cards are real single-select client state: clicking a card selects it and applies a highlighted border/ring style.
- The payment method list is static display only, nothing is clickable there.
- The Confirm ride button is decorative only, no ride is actually requested.
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.