Skip to content

Tab

Tabs are used inside tab groups to represent tab panels.
Additional demonstrations can be found in the tab group examples.

TabActiveClosableDisabled
html
<six-tab>Tab</six-tab>
<six-tab active>Active</six-tab>
<six-tab closable>Closable</six-tab>
<six-tab disabled>Disabled</six-tab>

Properties

PropertyAttributeDescriptionTypeDefault
activeactiveSet to true to draw the tab in an active state.booleanfalse
closableclosableWhen true, the tab will be rendered with a close icon.booleanfalse
disableddisabledSet to true to draw the tab in a disabled state.booleanfalse
panelpanelThe name of the tab panel the tab will control. The panel must be located in the same tab group.string''

Events

EventDescriptionType
six-tab-closeEmitted when the tab is closable and the close button is activated.CustomEvent<undefined>

Methods

removeFocus() => Promise<void>

Removes focus from the tab.

Returns

Type: Promise<void>

setFocus(options?: FocusOptions) => Promise<void>

Sets focus to the tab.

Parameters

NameTypeDescription
optionsFocusOptions | undefined

Returns

Type: Promise<void>

Slots

SlotDescription
The tab's label.

Shadow Parts

PartDescription
"base"The component's base wrapper.
"close-button"The close button, which is the icon button's base wrapper.

Dependencies

Depends on

Graph


Copyright © 2021-present SIX-Group