UnderlinePanels
The UnderlinePanels are used to break related content into tabbed panels.
Page navigation navigation
Underlined panels let users switch between 2 or more related panels of content without changing the URL or leaving their current context.
If you want to use this pattern for tabs that change the URL when activated, use the UnderlineNav component instead.
React examples
Default
With counter badges
With leading icons
More code examples
The previous examples are a curated subset of the full capabilities (such as reponsive behavior) of the UnderlinePanels component. For more examples, see the UnderlinePanels Storybook stories.
Props
UnderlinePanels
| Name | Default | Description |
|---|---|---|
aria-label | stringAccessible name for the tab list | |
aria-labelledby | stringID of the element containing the name for the tab list | |
children Required | Array<UnderlinePanels.Tab | UnderlinePanels.Panel>Tabs (UnderlinePanels.Tab) and panels (UnderlinePanels.Panel) to render | |
id | stringCustom string to use when generating the IDs of tabs and | |
loadingCounters | false | booleanLoading state for all counters. It displays loading animation for individual counters until all are resolved. It is needed to prevent multiple layout shift. |
sx Deprecated | SystemStyleObject |
UnderlinePanels.Tab
| Name | Default | Description |
|---|---|---|
aria-selected | false | | boolean | 'true' | 'false'Whether this is the selected tab. For more information about |
onSelect | (event) => voidThe handler that gets called when the tab is selected | |
counter | number | stringContent of CounterLabel rendered after tab text label | |
icon | ComponentIcon rendered before the tab text label | |
sx Deprecated | SystemStyleObject |
UnderlinePanels.Panel
| Name | Default | Description |
|---|---|---|
sx Deprecated | SystemStyleObject |