范围滑块

New

带刻度点的范围滑块,弹性竖条滑块在吸附步进间平滑滑动;支持拖拽与键盘操作,对「减少动效」偏好友好。

Drag the handle40

安装

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

$ bunx --bun shadcn add @uilab/range-slider

API 参考

value?
number
defaultValue?
number
0
onValueChange?
((value: number) => void)
min?
number
0
max?
number
100
step?
number
1
showTicks?
boolean

Render a tick dot at each step.

true
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.