YYonda UI Docs

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

KeyAction
ArrowRight / ArrowDownMove to and select next non-sold-out slot
ArrowLeft / ArrowUpMove to and select previous non-sold-out slot
HomeJump to and select first available slot
EndJump to and select last available slot
Tab / Shift+TabMove focus in/out of the group (roving tabIndex)

Props reference

PropTypeRequiredDescription
slotsTimeSlot[]yesArray of slot objects to render
slots[].idstringyesUnique key for the slot; passed to onChange
slots[].timestringyesDisplay time, e.g. '9:00 AM'
slots[].pricestringnoPre-formatted price shown below the time
slots[].availability'available' | 'limited' | 'sold-out'yesControls visual state and disabled status
valuestringnoCurrently selected slot id
onChange(id: string) => voidyesCalled when user selects a slot
labelstringno (default 'Available time slots')aria-label for the radiogroup
classNamestringnoExtra classes on the grid container