Skip to content

Wheel Picker

A cylindrical list settles into a softly framed selection.

LIVE PREVIEWInteract with the component
Just React. No extra dependencies.

Copy the component and its CSS module into your project.

CSS Modules

Usage

Matches your current playground settings.

jsx
import WheelPicker from "./WheelPicker";
export default function Example() {
return (
<WheelPicker
items={[
{
"value": "paper",
"label": "Paper"
},
{
"value": "linen",
"label": "Linen"
},
{
"value": "clay",
"label": "Clay"
},
{
"value": "stone",
"label": "Stone"
},
{
"value": "glass",
"label": "Glass"
},
{
"value": "metal",
"label": "Metal"
},
{
"value": "ink",
"label": "Ink"
}
]}
defaultValue={"stone"}
label={"Select a material"}
itemHeight={48}
accentColor={"#e1cee9"}
background={"#1c1821"}
/>
);
}

Using Wheel Picker

Supply labelled options through items and name the picker through label. itemHeight controls the spacing of the cylindrical list.

Use value with onValueChange for external selection, or defaultValue for local state. Keep labels concise enough to fit the selected row.

Props

NameTypeRequiredDefaultDescription
itemsobject[]No[]Array of { value, label, disabled? }. Use unique string values.
valuestringNoundefinedOptional controlled selected value.
defaultValuestringNoundefinedInitial uncontrolled value; otherwise select the first enabled item.
onValueChangefunctionNoundefinedCalled with the requested selected value.
labelstringNo"Choose an option"Accessible group label and prefix for previous/next control labels.
itemHeightnumberNo48Row height in pixels, clamped to at least 30.
accentColorstringNo"#dec8eb"Text, selection band, and focus colour.
backgroundstringNo"#1c1821"Wheel surface colour.
classNamestringNo""Additional classes merged with component styles.
styleCSSPropertiesNoundefinedInline styles for caller-defined sizing, typography, and appearance.

Related components

A recessed password field pairs a reveal control with an optional strength indicator.

Editable tags collect inside a softly framed input with individual remove controls.

A recessed search field expands into a polished capsule as you type.

Faceted stars lift into selection with a small marker beneath the chosen rating.