Docyrus

WheelPicker

Scrollable wheel picker for selecting from a list of options with snap-to-item behavior.

iOSAndroid
Preview WheelPicker on your device

Scan with Expo Go

Download Expo Go, then scan the QR code to preview native components.

Installation

pnpm dlx @docyrus/cli add @docyrus/rn-wheel-picker

Usage

import { WheelPicker } from '@/components/docyrus-native/wheel-picker';

const options = [
  { label: 'Red', value: 'red' },
  { label: 'Green', value: 'green' },
  { label: 'Blue', value: 'blue' },
];

<WheelPicker
  options={options}
  value={selected}
  onChange={(val) => setSelected(val)}
/>

API Reference

PropTypeDefaultDescription
optionsWheelPickerOption[]—Array of selectable options
valuestring—Currently selected value
onChange(value: string) => void—Selection change handler
itemHeightnumber44Height of each option row in pixels
visibleItemsnumber5Number of visible items in the wheel
disabledbooleanfalseDisable scrolling and selection (dimmed)
accessibilityLabelstring—Screen-reader label; the selected option's label is exposed as the accessibility value
classNamestring—Additional CSS classes
styleViewStyle—Container style

Selection commits when scrolling settles (snap) or when an option is tapped. Changing value from outside scrolls the wheel to it, and landing on a disabled option snaps back to the current selection. WheelPicker powers the month / year jump sheet of DayPicker (captionLayout="dropdown").

WheelPickerOption

PropTypeDescription
labelstringDisplay text
valuestringOption value
disabledbooleanWhether the option is disabled
iconstringImage URI for an icon
initialsstringInitials badge shown when there is no icon

Components

ComponentDescription
WheelPickerSnap-scrolling wheel picker

Type Exports

TypeDescription
WheelPickerPropsProps for WheelPicker component
WheelPickerOptionOption item configuration

On this page