Skip to main content

Tab Bar API

Properties
NameTypeDefaultDescription
fullheightbooleanfalseDefines if the component is used within a full-height layout.
verticalbooleanfalseDefines if the tab bar should use a vertical layout.
icon-hiddenbooleanfalseHides all icons.
label-visiblebooleannullControls label visibility. When not set, it is the inverse of the vertical attribute.
JavaScript API
NameKindDescription
selectedTabgetterReturns the currently selected tab element.
setSelectedTabById(id)actionFinds the tab by id and selects it.
selectedTabIndexgetterReturns the index of the currently selected tab.
setSelectedTabByIndex(index)actionFinds the tab by index and selects it.
isFirstTabSelectedgetterReturns whether the currently selected tab is the first.
isLastTabSelectedgetterReturns whether the currently selected tab is the last.
moveSelectedTab(direction)actionMoves the selected tab in the specified direction. Accepts 'next', 'previous', 'first', or 'last'.
Events
EventDescriptionReturns
triggerFires when a non-disabled tab is clicked.{ detail: { tab: { content, disabled, icon, id, label } } }