WheelPicker

iOS-style drum picker — a column of options that scrolls and snaps to a selection

Category: inputs · WCAG 2.2-AA · inputs, picker, wheel, drum, scroll-snap, mobile, ios

States

Props

PropTypeDefaultDescription
optionsWheelPickerOption[]The rows of the wheel, in order
valuestringThe selected option value; the component is controlled
onValueChange(value: string) => voidCalled with the new value when the wheel settles or a key moves the selection
visibleCountnumber5How many rows are visible. Odd numbers keep the selection centred.
itemHeightnumber36Row height in px.
ariaLabelstringAccessible label for the wheel — required when it has no visible label
classNamestringAdditional CSS class names merged onto the root element.

Design tokens

When to use

When not to use

How to build an accessible WheelPicker in React →

Examples

Basic

Controlled — the caller owns the value.

<WheelPicker
  ariaLabel="Hour"
  value={hour}
  onValueChange={setHour}
  options={[
    { value: '09', label: '09' },
    { value: '10', label: '10' },
    { value: '11', label: '11' },
  ]}
/>

Taller wheel

Shows more rows around the selection.

<WheelPicker ariaLabel="Minute" value={minute} onValueChange={setMinute} options={minutes} visibleCount={7} />

Several columns

Compose one wheel per field; each column is independently operable.

<Flex gap="0">
  <WheelPicker ariaLabel="Hour" value={hour} onValueChange={setHour} options={hours} />
  <WheelPicker ariaLabel="Minute" value={minute} onValueChange={setMinute} options={minutes} />
</Flex>

Related components

← Back to docs