Compose the list and the panels.
project-tabs.tsx
Tabs
<div>| Prop | Type | Default | Description | |||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| class | string | — | ||||||||||||||||||||||
From Base UITabs.RootBase UI docs | ||||||||||||||||||||||||
| value | any | — | The value of the currently active Tab. Use when the component is controlled. When the value is null, no Tab will be active. | |||||||||||||||||||||
| default | any | 0 | The default value. Use when the component is not controlled. When the value is null, no Tab will be active. | |||||||||||||||||||||
| orientation | "horizontal""vertical" | 'horizontal' | The component orientation (layout flow direction). | |||||||||||||||||||||
| ||||||||||||||||||||||||
| ...props | <div> attributes | — | Every other attribute goes to the <div>, with a ref. | |||||||||||||||||||||
TabsList
<div>| Prop | Type | Default | Description | |||||||
|---|---|---|---|---|---|---|---|---|---|---|
| rounded | "default""full" | "default" | ||||||||
| size | "default""lg""sm" | "default" | ||||||||
| variant | "default""folder""line" | "default" | ||||||||
| class | string | — | ||||||||
From Base UITabs.ListBase UI docs | ||||||||||
| activate | boolean | true | Whether to automatically change the active tab on arrow key focus. Otherwise, tabs will be activated using <kbd>Enter</kbd> or <kbd>Space</kbd> key press. | |||||||
| loop | boolean | true | Whether to loop keyboard focus back to the first item when the end of the list is reached while using the arrow keys. | |||||||
| render | — | Allows you to replace the component's HTML element with a different tag, or compose it with another component. Accepts a ReactElement or a function that returns the element to render. | ||||||||
| ||||||||||
| ...props | <div> attributes | — | Every other attribute goes to the <div>, with a ref. | |||||||
TabsTrigger
<button>| Prop | Type | Default | Description | |||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| class | string | — | ||||||||||||
From Base UITabs.TabBase UI docs | ||||||||||||||
| value | any | — | The value of the Tab. | |||||||||||
| disabled | boolean | — | Whether the Tab is disabled. If a first Tab on a <Tabs.List> is disabled, it won't initially be selected. Instead, the next enabled Tab will be selected. However, it does not work like this during server-side rendering, as it is not known during pre-rendering which Tabs are disabled. To work around it, ensure that defaultValue or value on <Tabs.Root> is set to an enabled Tab's value. | |||||||||||
| render | — | Allows you to replace the component's HTML element with a different tag, or compose it with another component. Accepts a ReactElement or a function that returns the element to render. | ||||||||||||
| ||||||||||||||
| ...props | <button> attributes | — | Every other attribute goes to the <button>, with a ref. | |||||||||||
TabsContent
<div>| Prop | Type | Default | Description | |||||||
|---|---|---|---|---|---|---|---|---|---|---|
| class | string | — | ||||||||
| gap | "default""none" | "default" | The space between the list and the panel: default (12px) or none, for a panel that sits flush under a list in a head with its own edge (the JSX Preview stage). | |||||||
From Base UITabs.PanelBase UI docs | ||||||||||
| value | any | — | The value of the TabPanel. It will be shown when the Tab with the corresponding value is active. | |||||||
| keep | boolean | false | Whether to keep the HTML element in the DOM while the panel is hidden. | |||||||
| render | — | Allows you to replace the component's HTML element with a different tag, or compose it with another component. Accepts a ReactElement or a function that returns the element to render. | ||||||||
| ||||||||||
| ...props | <div> attributes | — | Every other attribute goes to the <div>, with a ref. | |||||||
| Left ArroworRight Arrow | Moves to the tab before or after. Up and Down do it when vertical. |
|---|---|
| HomeorEnd | Goes to the first or the last tab. |
| Tab | Moves to the panel. |
- Segmented ControlPick Segmented Control to set one value with no panels, such as a view mode that a form sends.
- Thumb BarA floating tab bar for phone apps. A soft fill stretches from tab to tab, and you can slide your thumb along the bar to pick a tab.
- Toggle GroupPick Toggle Group for a row of toggles that set one value or many, with no panels.
- Navigation MenuThe top navigation of a site: links and triggers that open one shared panel of link cards, with nested and inline submenus.





