TabSwitcher
Switch to a new tab, switch to a new life.
Example
Props
đšī¸ standard props
tabs Tab[]
List of tabs to be displayed
[]selected string
The currently selected tab
undefinedmandatory boolean
Whether a tab must be selected at all times
trueclass { container?: string, tabs?: string, selected?: string, bookmark?: string, guide?: string }
CSS classes to customize the component
undefinedđ¨ style props
--tab-switcher-selected-color color
Color for the selected tab
rgb(var(--global-color-primary-400))--tab-switcher-guide-color color
Color for the guide line below the tabs
rgb(var(--global-color-contrast-200))--tab-switcher-bookmark-color color
Color for the bookmark indicator
rgb(var(--global-color-primary-400))--tab-switcher-gap size
Gap between tabs
1rem--tab-switcher-width size
Width of the tab switcher container
100%Slots
appendSnippet
A snippet that is appended to the tab container
Events
ontabClick
Triggered when a tab is clicked
| Attribute | Type | Description |
|---|---|---|
| nativeEvent | MouseEvent | The native mouse click event |
| tab | Tab | The clicked tab object |
ontabKeypress
Triggered when a key is pressed while focusing on a tab
| Attribute | Type | Description |
|---|---|---|
| nativeEvent | KeyboardEvent | The native keyboard event |
| tab | Tab | The tab that was selected via keypress |