单选组

New

单选控件,指示圆点通过 layoutId 平滑滑动定位,并带有弹簧按压反馈。

安装

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

$ bunx --bun shadcn add @uilab/radio

API 参考

RadioGroup

value?
string
defaultValue?
string
onValueChange?
((value: string) => void)
className?
string
orientation?
"horizontal" | "vertical"
vertical

RadioGroupItem

value
string
label?
string
disabled?
boolean
className?
string
id?
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.