Guest Picker

Popover-based guest selector for accommodation booking. Handles adults, children, infants, and pets with occupancy constraints. Supports child age capture (requireChildAges) with per-child selects and a blocked Done state until all ages are provided. Summary includes ages when captured: "2 children (5, 10)". Exports GuestPickerPanel for composition in search bars.

core/guest-picker

Installation

1 · Add registry to components.json

2 · Install component

Examples

Default

Default, child ages required, and constrained (max 4 guests) configurations.

API Reference

PropTypeDescription
valuereq
GuestValueControlled { adults, children, infants, pets, childrenAges? } value. childrenAges is an array of ages (0–17) whose length matches children.
onChangereq
(value: GuestValue) => voidCalled when any category or child age changes.
config
GuestPickerConfigOccupancy constraints and behavioural flags. Key fields: maxAdults, maxChildren, maxInfants, maxPets, maxTotal, minAdults, allowInfants, allowPets, requireChildAges, ageBands, infantNote, petNote.
placeholder
stringTrigger placeholder when no guests are selected.
disabled
booleanDisables the trigger.
open
booleanControlled popover open state.
onOpenChange
(open: boolean) => voidCalled when the popover open state changes.