CaTabs
Toggle content panel by tabs
SASS-path: ./styles/components/molecules/ca-tabs.scss
Props
| Name | Description | Type | Required | Default |
|---|
| tabs | Labels to build tabs | Array | true | - |
| selectedTab | Selected tab by index | Number | false | 0 |
Events
| Event Name | Description | Parameters |
|---|
| clicked | - | - |
Slots
| Name | Description | Default Slot Content |
|---|
| panels | - | - |
Methods
| Method | Description | Parameters |
|---|
| tabId | Id for tab TODO: Make unique. Will currently get duplicated if several instances of component | index (Number) |
| panelId | panel-id for accessibility TODO: Make unique. Will currently get duplicated if several instances of component | index (Number) |
| isSelected | If current tab is selected | index (Number) |
| setTabIndex | Tab index for keyboard navigation | index (Number) |
| setAriaSelected | aria-selected for accessibility Return as expected String making sure not to remove the attr | index (Number) |
Computed
| Computed | Type | Description | From Store |
|---|
| selected | Number | Case selected tab index is above panel count - fallback 0 | No |