可展开选项卡

图标选项卡栏,当前选项卡展开为带文字标签的胶囊,上方面板随切换变形高度,内容按方向感知滑动。

安装

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

$ bunx --bun shadcn add @uilab/expandable-tabs

API 参考

items
ExpandableTabsItem[]
value?
string | null

Active tab id, or null/undefined for the closed (bar-only) state.

defaultValue?
string | null
null
onValueChange?
((id: string | null) => void)
className?
string
classNames?
ExpandableTabsClassNames

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.