Account and password
Index-divider tabs: the active one is lifted and filled with highlighter, and the pencil baseline breaks under it. Arrow keys move between tabs, Home and End jump to the ends.
Index-divider tabs: the active one is lifted and filled with highlighter, and the pencil baseline breaks under it. Also a hairline `line` style with a blue felt underline, and vertical binder tabs. Radix behavior and roving focus are untouched.
npx shadcn@latest add @wobko/tabs第一次使用?先把 registry 加进 components.json。 如何安装
Index-divider tabs: the active one is lifted and filled with highlighter, and the pencil baseline breaks under it. Arrow keys move between tabs, Home and End jump to the ends.
`variant="line"` is a hairline with the active tab underlined in blue felt, wiped in from the reading side. Icons sit at 16 px in the same weight as the label; a disabled tab is skipped by the arrow keys.
`orientation="vertical"`: tabs down a spine like binder dividers, the active one filled and open towards its page. ArrowUp and ArrowDown move between them.
`value` and `onValueChange` drive the tabs from outside; `activationMode="manual"` moves focus with the arrow keys and only opens a tab on Enter or Space, which suits panels that are slow to load.
Official `tabs-demo`: Account and Password tabs, each holding a Card with a small form. The tabs are index dividers standing on a pencil baseline; the active one is lifted and filled with highlighter. Arrow keys move between tabs, Home and End jump to the first and last.
The Radix Tabs root. Vertical tabs lay the list and the panel side by side.
| 属性 | 类型 | 默认值 | 说明 |
|---|---|---|---|
| value / defaultValue / onValueChange | string / string / (value: string) => void | - | Controlled and uncontrolled state. |
| orientation | "horizontal" | "vertical" | "horizontal" | Vertical draws binder tabs on a spine and moves with ArrowUp / ArrowDown. |
| activationMode | "automatic" | "manual" | "automatic" | Automatic opens a tab as focus reaches it; manual waits for Enter or Space. |
| dir | "ltr" | "rtl" | - | Reading direction; the arrows and the drawings follow it. |
The `role="tablist"` row (or column). `tabsListVariants` is exported for consumers that style their own list.
| 属性 | 类型 | 默认值 | 说明 |
|---|---|---|---|
| variant | "default" | "line" | "default" | `default` = paper index tabs; `line` = hairline with the active tab underlined in blue felt. |
A tab (Radix Trigger, a button). It hosts its own drawing: sketch and baseline at rest, felt outline on hover, highlighter fill when active, a blue ring on keyboard focus.
| 属性 | 类型 | 默认值 | 说明 |
|---|---|---|---|
| value | string | - | Ties the tab to its TabsContent. |
| disabled | boolean | false | Dashed pencil sketch, skipped by the arrow keys. |
| seed | string | number | - | Pins the hand. Default: derived from useId(). |
CLI 会复制进你项目的文件。
正在加载源码