选项卡

胶囊、分段或下划线样式的选项卡,配合 layoutId 实现弹簧动效的指示条切换。

Pill
High-level summary.
Segment
Underline

安装

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

$ bunx --bun shadcn add @uilab/tabs

API 参考

Tabs

defaultValue?
string
value?
string
onValueChange?
((v: string) => void)
variant?
"underline" | "pill" | "segment"
pill
className?
string

TabsList

className?
string

TabsTrigger

value
string
className?
string
indicatorClassName?
string

TabsContent

value
string
className?
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.