TimeSlotPicker
Button grid for selecting a departure or pickup time. Each slot shows time, optional price, and availability state — available, limited (amber dot), or sold-out (disabled + strikethrough). Keyboard navigable with roving tabIndex and ArrowKey / Home / End support.
Tour departures
Slots with per-slot pricing. Morning slots at $49, afternoon slots at $59. One limited (amber dot) and one sold-out slot per period.
Select a departure time
Selected: 9:00 AM
Airport transfer — no per-slot price
When all slots share the same price (or price is irrelevant at this step), omit the price field.
Select a pickup time
Availability legend
available
Available
Normal border, hover highlights in brand primary
limited
Limited
Same as available, plus an amber dot below the time
sold-out
Sold out
Disabled, muted background, strikethrough time text
Keyboard behaviour
| Key | Action |
|---|---|
| ArrowRight / ArrowDown | Move to and select next non-sold-out slot |
| ArrowLeft / ArrowUp | Move to and select previous non-sold-out slot |
| Home | Jump to and select first available slot |
| End | Jump to and select last available slot |
| Tab / Shift+Tab | Move focus in/out of the group (roving tabIndex) |
Props reference
| Prop | Type | Required | Description |
|---|---|---|---|
| slots | TimeSlot[] | yes | Array of slot objects to render |
| slots[].id | string | yes | Unique key for the slot; passed to onChange |
| slots[].time | string | yes | Display time, e.g. '9:00 AM' |
| slots[].price | string | no | Pre-formatted price shown below the time |
| slots[].availability | 'available' | 'limited' | 'sold-out' | yes | Controls visual state and disabled status |
| value | string | no | Currently selected slot id |
| onChange | (id: string) => void | yes | Called when user selects a slot |
| label | string | no (default 'Available time slots') | aria-label for the radiogroup |
| className | string | no | Extra classes on the grid container |