Skip to main content

CaTabs

Toggle content panel by tabs

SASS-path: ./styles/components/molecules/ca-tabs.scss

Props

NameDescriptionTypeRequiredDefault
tabsLabels to build tabsArraytrue-
selectedTabSelected tab by indexNumberfalse0

Events

Event NameDescriptionParameters
clicked--

Slots

NameDescriptionDefault Slot Content
panels--

Methods

MethodDescriptionParameters
tabIdId for tab TODO: Make unique. Will currently get duplicated if several instances of componentindex (Number)
panelIdpanel-id for accessibility TODO: Make unique. Will currently get duplicated if several instances of componentindex (Number)
isSelectedIf current tab is selectedindex (Number)
setTabIndexTab index for keyboard navigationindex (Number)
setAriaSelectedaria-selected for accessibility Return as expected String making sure not to remove the attrindex (Number)

Computed

ComputedTypeDescriptionFrom Store
selectedNumberCase selected tab index is above panel count - fallback 0No