Tabs organize and allow navigation between groups of content that are related and at the same level of hierarchy.
- Slots
-
default— Renders the tab components inside the default slot.
- CSS Parts
-
header— The header strip behind the tab headers. -
start-scroll-button— The start scroll button displayed when the tabs overflow. -
end-scroll-button— The end scroll button displayed when the tabs overflow. -
selected-indicator— The indicator that shows which tab is selected. -
tabs— The scroll container of the tab headers. -
inner— The wrapper of the tab headers, the scroll buttons and the selected indicator. -
scrollable— Added to the inner part while the scroll buttons show.
Properties
Section titled "Properties"activation
Section titled "activation"The activation behavior of the tabs.
With auto, a tab is selected when it receives keyboard focus.
With manual, a tab is selected only on click, or on Enter or Space.
activation: TabsActivation alignment
Section titled "alignment"The alignment of the tab headers in the header strip.
In a column, start is the top and end is the bottom.
alignment: TabsAlignment headerPosition
Section titled "headerPosition"The side of the panels on which the tab headers are placed.
With top, the headers form a row above the panels. With start and end, they
form a column before or after the panels in the text direction, so start is on
the right in a right-to-left layout. In a column, the Up and Down arrow keys move
between the tabs. When the headers do not fit in the height of the tabs, scroll
buttons above and below them scroll the column.
headerPosition: TabsHeaderPosition Accessors
Section titled "Accessors"selected
Section titled "selected"The label of the selected tab, or its id when the tab has no label.
An empty string when no tab is selected.
get selected(): string
Returns string
selectedTab
Section titled "selectedTab"The selected tab, or null when no tab is selected.
get selectedTab(): IgrTabComponent | null
Returns IgrTabComponent | null
The tab children of the component.
get tabs(): IgrTabComponent[]
Returns IgrTabComponent[]
Methods
Section titled "Methods"select
Section titled "select"Selects the tab matching the passed IDREF or label and displays the corresponding panel.
Disabled tabs and values not matching any tab are ignored.
select(idOrLabel: string): void Parameters
- idOrLabel:
string
Returns void
Events
Section titled "Events"onChange
Section titled "onChange"Emitted when the selected tab changes.
onChange(args: CustomEvent<IgrTabComponent>): void Parameters
- args:
CustomEvent<IgrTabComponent>