A folder with tabs
The front tab is the folder's color and runs into the body; the others stand behind it. Arrow keys move between tabs; Home and End jump.
A manila file folder that is also a set of tabs: a row of paper tabs standing on a sheet of the same paper. The active tab is the folder's own color and runs down into the body, so tab and folder are one piece; the others stand a little lower and darker. It is Radix Tabs underneath.
npx shadcn@latest add @wobko/folderFirst time here? Add the registry to components.json first. How to install
The front tab is the folder's color and runs into the body; the others stand behind it. Arrow keys move between tabs; Home and End jump.
The folder is whatever its stock is: manila, a legal-pad yellow or white card. A folder with one tab is just a labeled folder.
The open tab is your state: `value` and `onValueChange`, as on Tabs. Here a button jumps to the next one.
A real page: a project's tasks, notes and files as tabs on one folder, with a form inside the open panel. Each panel is ordinary DOM; only the open one is in the page.
The Radix Tabs root, a flex column at most 42 rem wide. It takes the Tabs props (`value`, `defaultValue`, `onValueChange`, `dir`, `activationMode`) except `orientation`: a folder's tabs stand along its top edge, so it is always horizontal (Left / Right move between tabs; Up / Down do not).
| Prop | Type | Default | Description |
|---|---|---|---|
| stock | StockName | "kraft" | What tabs and body are made of: kraft (manila), sticky-yellow, paper, index-card ... |
One tab (`role="tab"`), 2.25 rem high (2 rem compact, 1.75 rem calm), its paper drawn behind the label. The active tab is the front one; a disabled tab is only a dashed pencil outline. Arrow keys, Home and End move between tabs; the label is real text.
| Prop | Type | Default | Description |
|---|---|---|---|
| value | string | - | Which panel it opens. |
| disabled | boolean | - | Skipped by the arrow keys; drawn as a dashed ghost. |
The panel a tab opens onto (`role="tabpanel"`), a Paper in the folder's stock, square to the desk. Only the active panel is in the page.
| Prop | Type | Default | Description |
|---|---|---|---|
| value | string | - | The tab it belongs to. |
| crease | boolean | true | The fold across the top of the sheet. |
| tape / fastener / edge / shadow / seed / tilt | Paper props | - | As on any sheet (tilt defaults to none, so the tabs stay square to the body). |
The files the CLI copies into your project.
Loading the source