Learn about the Tabs component for use in UI extensions.
Tabs
component allows you to group related content into clickable tabs, with each Tab
child component creating a new tab. Options are provided for visual variants, tooltip configuration, and more.
Prop | Type | Description |
---|---|---|
defaultSelected | String | Number | The ID of the tab to display by default (as set by the Tab ’s tabId prop). |
fill | Boolean | Whether the tabs should fill the available space. |
onSelectedChange | (selectedId: string | number) => void | A function that gets invoked when the selected tab changes. |
selected | String | Number | The currently selected tab ID, for controlling the component via React state. |
variant | default | enclosed | Visual style of the tabs. See variants for more information. |
Prop | Type | Description |
---|---|---|
disabled | Boolean | Whether the tab should be disabled. When set to false , tab will be greyed out and not clickable. |
tabId | String | Number | The tab’s unique identifier. |
title | String | The tab’s title text. |
tooltip | String | The text that appears in a tooltip on hover. Learn more about tooltips. |
tooltipPlacement | top (default) | bottom | left | right | | Where the tooltip should appear, relative to the tab. |
variant
prop provides two options for tab styling: default
and enclosed
.
fill
prop to true
to configure the tabs to take up the full width of the container.
tooltip
prop to add tooltips to tabs on hover. By default, the tooltip will appear above the tab, but you can use the tooltipPlacement
prop to configure it further.
selected
and onSelectedChange
props.