Wheel Picker
An iOS-style scroll wheel for choosing options, times, and dates. Installs under components/wheel-picker, not under ui/.
Basic
Pick a single value from a scrollable wheel.
Loading…
Installation
CLI
Also needs
npm i @ncdai/react-wheel-picker@^1.2.3Composition
structure
Usage
wheel-picker.tsx
| Prop | Type | Default | Description |
|---|---|---|---|
| options | WheelPickerOption[] | - | Items in the wheel (`label`, `value`, optional `disabled`). |
| value | string · number | - | Controlled selected value. |
| defaultValue | string · number | - | Uncontrolled initial value. |
| onValueChange | (value: string · number) => void | - | Fires when the selection changes. |
| infinite | boolean | false | Loop the column endlessly. |
| visibleCount | number | 20 | Visible rows (must be a multiple of 4). |
| classNames | WheelPickerClassNames | - | Classes for option items, highlight wrapper, and highlight item. |