滚轮选择器

New

iOS 风格的滚轮选择器:基于原生惯性滚动的 3D 转筒,自动吸附至最近刻度,支持滚轮、拖拽与键盘操作。可并排组合成日期与时间选择器,对「减少动效」偏好友好。

Born June 9, 2004

安装

用 shadcn CLI 添加,或手动复制源码。

$ bunx --bun shadcn add @uilab/wheel-picker

API 参考

options
WheelPickerOption[]
value?
string
defaultValue?
string
onValueChange?
((value: string) => void)
visibleCount?
number

Rows visible through the window, odd. More = flatter curve. Default 5.

5
itemHeight?
number

Row height in px. Default 36.

36
disabled?
boolean
false
className?
string
aria-label?
string

Keep in mind

Some components on this site are inspired by or recreated from existing work across the web. I'm not here to take credit; just to learn, experiment, and sometimes push things a bit further. If something looks familiar and I forgot to mention you, reach out and I'll fix that right away.