Coming from Orbiter, you should be aware of the following changes:
orientation
has been removed, not supported.disabled
has been removed, not supported.manual
has been removed. Refer to this sample to quickly match old sizes.
Preview Only: These components are for reference only. Continue using Orbiter in production until further notice.
Tabs are used to organize content by grouping similar information on the same page.
A Tab
uses the following components:
Tabs can vary in size.
A tab can contain an icon.
A tab can contain a lozenge.
A tab can contain a badge.
Tabs items can be rendered dynamically.
By default, tabs are activated automatically. This means when you use the arrow keys to change tabs, the tab is activated and focused.
The content of a tab should ideally be preloaded. However, if switching to a tab panel causes a network request and possibly a page refresh, there might be some notable latency and this might affect the experience for keyboard and screen reader users.
In this scenario, you should use a manually activated tab, which moves focus without activating the tabs. With the focus on a specific tab, users can activate a tab by pressing Space or Enter.
Tabs can use different variants.
A tabs component can split the width of its container equally between its tabs.
The selectedKey state can be handled in a controlled mode.
All tabs can be disabled using the isDisabled
prop.
An individual Tab can be disabled with the isDisabled prop. Disabled tabs are not focusable, selectable, or keyboard navigable.
In dynamic collections, it may be more convenient to use the disabledKeys prop at the Tabs level instead of isDisabled on individual tabs.
Each key in this list corresponds with the id
prop passed to the Tab component, or automatically derived from the values passed to the items prop.
A tab is considered disabled if its id exists in disabledKeys
or if it has isDisabled
.
Tabs can be embedded in other components.
Tabs can be used as links.
The variant of the tabs.
The size of the tabs.
Whether or not the tabs takes up the width of its container.
The currently selected key in the collection (controlled).
The initial selected key in the collection (uncontrolled).
Whether the TabList is disabled. Shows that a selection exists, but is not available in that circumstance.
The item keys that are disabled. These items cannot be selected, focused, or otherwise interacted with.
Whether tabs are activated automatically on focus or manually.
The children of the component.
The inline style for the element.
The CSS className for the element.
Handler that is called when the selection changes.
A slot name for the component. Slots allow the component to receive props from a parent component.
An explicit null
value indicates that the local props completely override all props received from a parent.
Defines a string value that labels the current element.
Identifies the element (or elements) that labels the current element.
Identifies the element (or elements) that describes the object.
Identifies the element (or elements) that provide a detailed, extended description for the object.
The element's unique identifier. See MDN.
A slot name for the component. Slots allow the component to receive props from a parent component.
An explicit null
value indicates that the local props completely override all props received from a parent.
Defines a string value that labels the current element.
Identifies the element (or elements) that labels the current element.
Identifies the element (or elements) that describes the object.
Identifies the element (or elements) that provide a detailed, extended description for the object.
The element's unique identifier. See MDN.
Whether the tab is disabled.
A URL to link to. See MDN.
Hints at the human language of the linked URL. SeeMDN.
The target window for the link. See MDN.
The relationship between the linked resource and the current page. See MDN.
Causes the browser to download the linked URL. A string may be provided to suggest a file name. See MDN.
A space-separated list of URLs to ping when the link is followed. See MDN.
How much of the referrer to send when following the link. See MDN.
Options for the configured client side router.
The children of the component.
The CSS className for the element.
The inline style for the element.
Handler that is called when a hover interaction starts.
Handler that is called when a hover interaction ends.
Handler that is called when the hover state changes.
A slot name for the component. Slots allow the component to receive props from a parent component.
An explicit null
value indicates that the local props completely override all props received from a parent.
Defines a string value that labels the current element.
Identifies the element (or elements) that labels the current element.
Identifies the element (or elements) that describes the object.
Identifies the element (or elements) that provide a detailed, extended description for the object.
The element's unique identifier. See MDN.
Whether to mount the tab panel in the DOM even when it is not currently selected. Inactive tab panels are inert and cannot be interacted with. They must be styled appropriately so this is clear to the user visually.
The children of the component.
The CSS className for the element.
The inline style for the element.
A slot name for the component. Slots allow the component to receive props from a parent component.
An explicit null
value indicates that the local props completely override all props received from a parent.
Defines a string value that labels the current element.
Identifies the element (or elements) that labels the current element.
Identifies the element (or elements) that describes the object.
Identifies the element (or elements) that provide a detailed, extended description for the object.
The element's unique identifier. See MDN.
Coming from Orbiter, you should be aware of the following changes:
orientation
has been removed, not supported.disabled
has been removed, not supported.manual
has been removed. Refer to this sample to quickly match old sizes.