ValyroUI Русская версия

Wheel Picker

iOS-style picker wheel: momentum, 3D cylinder, date and time presets. Pro · Forms and input › Date and time

iOS-style picker wheels: drag, flick or scroll a column and it coasts and snaps to an option. Each column is a listbox: arrows, Page Up/Down, Home/End and type-ahead move the selection.

Installation

npx valyro-cli@latest login
npx valyro-cli@latest add wheel-picker
npm install valyro-ui-pro

import 'valyro-ui-pro/styles.css';
import { WheelPicker } from 'valyro-ui-pro';

Props

PropTypeDefault
columns *WheelPickerColumn[]Wheels from left to right, each with its own key, accessible label and options.
valuestring[]Selected option value per column, in column order.
defaultValuestring[]Initial value when uncontrolled.
onValueChange(value: string[]) => voidCalled when a wheel comes to rest on a new option (not on every row it passes).
visibleCountnumber5Rows the drum shows (default 5).
loopbooleanfalseEvery column wraps around (a column's own loop wins).
disabledbooleanfalseLocks every wheel: dragging, scrolling and keys are ignored and the columns leave the tab order.
invalidbooleanfalseError state, e.g. from a FormField: aria-invalid on every column (an explicit aria-invalid wins).

Related components

Previous: Time Field · Next: Date Of Birth Input · All Forms and input