Wheel picker
Drums you can fling: each column is a real cylinder that decays onto a row, with a lens in full colour over the middle.
Used forAlarm and timer appsDate pickersForms with short listsMobile web settings
Install with the shadcn CLI
Older shadcn CLI, or a network that blocks ui.shadcn.com? Install by URL: shadcn add https://hairlineui.com/r/wheel-picker.json. More
Templates
Need the whole page?
65 Next.js landing pages, each designed from scratch. Try any of them live; one is $39, all of them $159, and 8 are free.
Where it’s used
Alarm and timer apps
Choose hours and minutes on drums.
Date pickers
Day, month and year columns that never allow an impossible date.
Forms with short lists
Quantities, sizes or durations picked by turning a wheel.
Mobile web settings
A phone-style picker where a select would look out of place.
What it handles for you
Web pickers are usually a select, or a scrolling list with snap points that stutter. These are drums you can fling, like the ones on a phone.
Real drums
Options tip away toward the rim as they leave the middle, and a lens band in full colour sits over the middle row.
Flings that land
The release speed is projected forward and the wheel decays onto a row instead of snapping.
The value commits at rest
onValueChange is called once the wheel stops on a new option, not while it turns.
Options that can’t be chosen
Disabled options are dimmed and passed over, so a date picker can rule out days that do not exist.
Loops and units
Columns can loop, like minutes. A unit beside the lens morphs with the value, from “1 hour” to “2 hours”.
Keyboard and screen readers
Each wheel is a spinbutton: arrows step, Page Up and Down jump five, and Home and End go to the ends.
Overview
Web pickers are usually a select or a scrolling list with snap points that stutter. These are drums. Each column is a cylinder of faces turned by one transform, so the options tip away toward the rim as they leave the middle. The middle row is a second copy of the drum clipped to the band in full colour, so a number crossing the band's edge is half muted, half bright, like glass over the wheel. Drag and let go: the release speed is projected forward and the wheel decays onto a row instead of snapping, with a tick under the finger on phones that can vibrate. Wheels that don't loop stretch past their ends. The value is committed when the wheel rests, the unit beside the lens morphs with it, and options that can't be chosen are dimmed and passed over.
States
- drag
- The drum follows the pointer one row per row height. Past the ends of a wheel that doesn't loop it stretches with resistance, up to about one and a half rows.
- fling
- Release velocity from the last 90ms is projected 0.3s ahead and rounded to a row; the wheel decays onto it exponentially (τ 300ms, or 120ms for a short nudge), so it lands without a separate snap.
- wheel and keys
- A mouse notch or an arrow key moves one row (τ 110ms), Page Up and Down five. Trackpad scrolling turns the drum freely and settles 120ms after it goes quiet.
- rest
- The value is committed and announced as the wheel comes to rest. A unit beside the lens morphs with it, e.g. hour to hours. A dimmed option turns on to the nearest one that can be chosen.
- set from outside
- When the value changes from your code (a day that no longer exists in February), the wheel turns to it the shorter way round.
Usage
Works with
A date that can't be wrong
Days past the end of the month are disabled, so the wheel dims them and turns past them; when the month changes under a day that no longer exists, set the day and the wheel turns to it.
Props
- WheelPicker itemHeight= 36
- number
- Row height in px (28–56). The drum's radius, the band and the text size follow from it.
- WheelPicker haptics= true
- boolean
- A 3ms vibration per row while a finger turns a wheel, on phones that support it.
- options
- (T | { value: T; label?: string; disabled?: boolean })[]
- Strings, numbers or objects. Disabled options are dimmed and the wheel turns past them.
- value / defaultValue
- T
- Controlled or uncontrolled. A controlled change turns the wheel to the new option.
- onValueChange
- (value: T) => void
- Called once the wheel comes to rest on a new option, not while it turns.
- loop= false
- boolean
- Turn past the end back to the start, like minutes or months.
- label
- string
- What the wheel sets, for screen readers: "Hours".
- unit
- string | (value: T) => string
- Fixed beside the lens, e.g. "min", or a function for "1 hour" / "2 hours". It morphs when the value changes.
- align= "center"
- "start" | "center" | "end"
- Where the options sit in their column.
Accessibility and motion
- Each wheel is a spinbutton with aria-valuetext (the option and its unit). Arrow keys step, Page Up and Down jump five, Home and End go to the ends.
- A tap on a row above or below the lens turns it to the middle; the row is found from the drum's angle, not the flat offset, so rows near the rim land correctly.
- Every wheel has 18 faces whatever its length: only faces turning round the back are relabelled, so 60 minutes or 100 years cost the same. Turning writes two transforms a frame and renders nothing through React.
- The drum leaves a hole under the lens through its mask, so the lens copy is the only text there; mouse wheels over the picker turn it instead of scrolling the page.
- Reduced motion turns the wheel straight to the row instead of decaying onto it; dragging still follows the pointer.
Requirements
React 19, Tailwind CSS v4 and shadcn/ui theme variables (any style, light and dark). Icons from lucide-react.
The CLI also installs Text morph.
Source
Registry item: /r/wheel-picker.json


