"manual" | "automatic"The activation mode of the tabs. Can be `manual` or `automatic`
- `manual`: Tabs are activated when clicked or press `enter` key.
- `automatic`: Tabs are activated when receiving focus
composite
booleanWhether the tab is composite
defaultValue
stringThe initial selected tab value when rendered.
Use when you don't need to control the selected tab value.
deselectable
booleanWhether the active tab can be deselected when clicking on it.
id
stringThe unique identifier of the machine.
ids
{
root?: string;
trigger?: string;
list?: string;
content?: string;
indicator?: string;
}The ids of the elements in the tabs. Useful for composition.
loopFocus
true
booleanWhether the keyboard navigation will loop from last tab to first, and vice versa.
navigate
(details: NavigateDetails) => voidFunction to navigate to the selected tab when clicking on it.
Useful if tab triggers are anchor elements.
onFocusChange
(details: FocusChangeDetails) => voidCallback to be called when the focused tab changes
onValueChange
(details: ValueChangeDetails) => voidCallback to be called when the selected/active tab changes
orientation
"horizontal"
"horizontal" | "vertical"The orientation of the tabs. Can be `horizontal` or `vertical`
- `horizontal`: only left and right arrow key navigation will work.
- `vertical`: only up and down arrow key navigation will work.
translations
IntlTranslationsSpecifies the localized strings that identifies the accessibility elements and their states
value
stringThe controlled selected tab value
asChild
SnippetRender a different element.
Data Attribute
Value
data-focus
Present when focused
data-orientation
The orientation of the tabs
data-part
root
data-scope
tabs
Content
Prop
Default
Description
value
stringThe value of the tab.
asChild
SnippetRender a different element.
Data Attribute
Value
data-orientation
The orientation of the content
data-part
content
data-scope
tabs
data-selected
Present when selected
Indicator
Prop
Default
Description
asChild
SnippetRender a different element.
Data Attribute
Value
data-orientation
The orientation of the indicator
data-part
indicator
data-scope
tabs
List
Prop
Default
Description
asChild
SnippetRender a different element.
Data Attribute
Value
data-focus
Present when focused
data-orientation
The orientation of the list
data-part
list
data-scope
tabs
Trigger
Prop
Default
Description
disabled
booleanWhether the tab is disabled.
value
stringThe value of the tab.
asChild
SnippetRender a different element.
Data Attribute
Value
data-disabled
Present when disabled
data-focus
Present when focused
data-orientation
The orientation of the trigger
data-part
trigger
data-scope
tabs
data-selected
Present when selected
data-ssr
data-value
The value of the item
Accessibility
Keyboard Support
Key
Description
Tab
When focus moves onto the tabs, focuses the active trigger. When a trigger is focused, moves focus to the active content.
ArrowDown
Moves focus to the next trigger in vertical orientation and activates its associated content.
ArrowRight
Moves focus to the next trigger in horizontal orientation and activates its associated content.
ArrowUp
Moves focus to the previous trigger in vertical orientation and activates its associated content.
ArrowLeft
Moves focus to the previous trigger in horizontal orientation and activates its associated content.
Home
Moves focus to the first trigger and activates its associated content.
End
Moves focus to the last trigger and activates its associated content.
Enter + Space
In manual mode, when a trigger is focused, moves focus to its associated content.