Tabs organize and allow navigation between groups of content that are related and at the same level of hierarchy.
- Element
-
igc-tabs
- 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 = 'auto' Defined in src/components/tabs/tabs.ts:187
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 = 'start' Defined in src/components/tabs/tabs.ts:160
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 = 'top' Defined in src/components/tabs/tabs.ts:175
tagName
Section titled "tagName"The tagName read-only property of the Element interface returns the tag name of the element on which it's called.
tagName: "igc-tabs" = 'igc-tabs' Defined in src/components/tabs/tabs.ts:77
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 Defined in src/components/tabs/tabs.ts:199
Returns string
selectedTab
Section titled "selectedTab"The selected tab, or null when no tab is selected.
get selectedTab(): IgcTabComponent | null Defined in src/components/tabs/tabs.ts:205
Returns IgcTabComponent | null
The tab children of the component.
get tabs(): IgcTabComponent[] Defined in src/components/tabs/tabs.ts:191
Returns IgcTabComponent[]
Methods
Section titled "Methods"connectedCallback
Section titled "connectedCallback"connectedCallback(): void Defined in src/components/tabs/tabs.ts:248
Returns void
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 Defined in src/components/tabs/tabs.ts:603
Parameters
- idOrLabel:
string