React

Wheel Picker

A component for selecting one or more values by scrolling items vertically.

Available since@seed-design/react@2.4.0, @seed-design/css@2.6.0

Installation

npx @seed-design/cli@latest add ui:wheel-picker

Props

WheelPicker

Prop

Type

WheelPickerColumn

Prop

Type

Examples

Package API

The compound API of @seed-design/react is used when combining columns directly. You can adjust the entire or column-level styles with className on Root and each Column. renderLabel replaces the default ItemLabel with a returned element. If you need default spacing and alignment, you can recombine WheelPicker.ItemLabel as shown in the example. Slot style API for internal items and selection indicators is not provided.

Value Change

onIndexChange is called whenever the center item changes due to user scrolling or tapping. Since it passes the index and value of each item traversed in order even before settling, it can be used for per-item haptics. Handle the final selected value with onValueChange after scrolling settles.

React Element Label

String and number labels are used as-is for accessibility names. If you use React elements as labels, provide ariaLabel for each option. When accessibility text needs to be calculated separately, use getAriaValueText. Internal elements must inherit currentColor, and buttons, links, input elements, and multi-line content should not be included.

Disabled

disabled prevents both focus and manipulation of the column.

Data Contract

  • Provide one or more items in options for each column.
  • The option's value must be unique within the column.
  • The controlled value must be in the current options.
  • When a dependent column changes, pass new options and valid value in the same render.
  • If external value changes while the user is manipulating or waiting to settle, scroll position synchronization for that change is skipped.
  • Handle loading, error, and empty states outside Wheel Picker.

Wheel Picker does not automatically correct invalid values to the first item or call a correction callback. Configure date calculation, column dependencies, hidden inputs, and confirmation UI on the consuming side.

Accessibility

The entire Wheel Picker is provided as group, and each column as spinbutton. Specify aria-label or aria-labelledby on Root and each Column.

On keyboard, use ArrowUp and ArrowDown to select previous/next items. Home and End move to first/last items. Use Tab to move between columns.

Table of contents