tabs
v1.0.0arrow_drop_downDEPRECATED: Use the activeTabIndex or defaultActiveTabIndex prop on the Tabs component instead.
Specify if the tab is active If more than one tabs are marked as active, the first one will take effect
Specify if the tab will have a close button Only works when varient prop of parent Tabs is set to “box” or “canvas”
Specify if the tab is disabled
A @hig/icon element Icon will only be displayed when varient prop of parent Tabs is set to “box” or “canvas”
Sets the label of a tab
Function to modify the component’s styles
Prevents user actions on the button
Called when user moves focus away from the button
Called when user clicks the button
Called when user moves focus onto the button
Called when mouse is pressed over the button
Called when mouse begins to move over the button
Called when mouse stops moving over the button
Called when mouse is released over the button
Function to modify the component’s styles
Control the active tab. Overrides the deprecated active property on the Tab component.
Specify how to justify the tabs within their container When variant is set to "canvas", the effective alignment will always be “left”
Accepts Tab components
Sets the initial active tab. Overrides the deprecated active property on the Tab component.
Called when user activates a tab
Called when user closes a tab
The list orientation of the tabs Vertical tabs only works when variant is set to “box”
Show dividers between tabs Only works in horizontal tabs and when variant is set to “box” or “canvas”
Function to modify the component’s styles
The visual variant of the tabs
We maintain the active tab index in the state in case it was not provided as a prop.
If the activeTabIndex has been passed, use it. Otherwise, use our internally managed activeTabIndex.
Name | Type |
---|---|
key | string |
props | |
align | string? |
variant | string? |
orientation | string? |
showTabDivider | bool? |
defaultActiveTabIndex | number? |
activeTabIndex | number? |
onTabChange | function? |
onTabClose | function? |
children | ReactNode? |
activeTabIndex | number |
hoveredTabIndex | number |
effectiveAlign | string |
effectiveOrientation | string |
effectiveShowTabDivider | bool |