
Inputs · Free
Wheel picker
A quiet picker wheel like iOS: only the choice at rest, the neighbours curve out as you spin; flick, soft landing, loops for hours and minutes, text or icons.
Free on Gumroad: the download arrives in your inbox.
Details
- Category
- Inputs
- Plan
- Free
- Code
- React + Tailwind, TypeScript · 283 lines
- Files
- WheelPicker.tsx
- Needs
- React and Tailwind only
- Agents
- MCP server and shadcn registry
About
A picker wheel like the one on iOS, but quiet. The options sit on a vertical cylinder you spin. At rest only the chosen one shows; the top and bottom fade away. Start spinning and the neighbours come out of the dark, curving back on the wheel. Let go and it carries on with your flick, then lands on an option with a soft overshoot, the rows stretching a little with the speed, like jelly.
It stops with a rubbery give at the ends, or loops round and round for hours and minutes. Options can be text or icons (in the store, the StackD Bot's shapes). Each option that passes the middle can give a haptic tick on phones that support it.
React + Tailwind, no other libraries.
Install
With the shadcn CLI:
npx shadcn@latest add https://www.stackd.codes/r/wheel-picker.jsonOr let your agent add it through the StackD MCP server:
claude mcp add --transport http stackd https://www.stackd.codes/mcpPrompt for your agent
Paste it into Claude Code, Cursor, Codex or VS Code once the MCP server is connected.
Add the StackD Wheel picker component to this project. Use the StackD MCP server: call get_component with { "name": "wheel-picker" }, write the files at the paths it gives and install any npm packages it lists. Then use it where it fits, following its README for the props, and keep its own styles.Use
- Copy
WheelPicker.tsxinto your project (for examplecomponents/). - Use it:
import { WheelPicker, type WheelItem } from './components/WheelPicker'
const hours: WheelItem[] = Array.from({ length: 24 }, (_, i) => ({ id: `h${i}`, label: String(i).padStart(2, '0') }))
const minutes: WheelItem[] = Array.from({ length: 12 }, (_, i) => ({ id: `m${i * 5}`, label: String(i * 5).padStart(2, '0') }))
const [hour, setHour] = useState('h10')
const [min, setMin] = useState('m30')
<div className="flex items-center">
<WheelPicker items={hours} value={hour} onChange={(item) => setHour(item.id)} loop width={84} label="Hour" />
<span>:</span>
<WheelPicker items={minutes} value={min} onChange={(item) => setMin(item.id)} loop width={84} label="Minutes" />
</div>
// With icons: any React node, shown above its label
<WheelPicker items={[{ id: 'tea', label: 'Tea', icon: <TeaIcon /> }, { id: 'coffee', label: 'Coffee', icon: <CoffeeIcon /> }]} />
In Next.js the file already starts with 'use client'. In other React setups that line does nothing.
Options
| Prop | Default | What it does |
|---|---|---|
items | { id, label, icon? } | |
value | The chosen id, when you control it | |
defaultValue | the first | The chosen id at the start, when you don't |
onChange | Called with the item and its index when the wheel settles on a new one | |
onTick | Called each time an option passes the middle (for your own haptics or sound) | |
itemHeight | 56 (132 with icons) | Height of one row in px |
rows | 3.4 | Height of the wheel, in rows |
width | 220 | Width in px (or any CSS width) |
loop | false | Spin round and round instead of stopping at the ends |
theme | 'light' | 'light' or 'dark' |
label | 'Choose' | Read out by screen readers |
reveal | 0 | Hold the neighbours visible, 0 to 1, as if it were spinning: for covers and mock-ups |
className | Extra classes |
Accessibility
The wheel is a spin button with its label and the chosen option read out. Up and Down move one option, Page Up and Page Down five, Home and End go to the first and last. A tap above or below the middle moves one way; the mouse wheel and trackpad spin it too.
Colours from StackD
White #FFFFFF · Ink #141310 · Wine #901919 · Olive #6C8544 · Ochre #BE9344 · Lilac #C9B8FF
Licence
You can use it in personal and commercial projects. Don't resell or share the component on its own.




