Tab
A <button>: an interactive element in a tab list activated to show associated content
Code
<script lang="ts">
import { Tab } from '@geoffcox/sterling-svelte';
</script>
<Tab text="sterling-svelte" value="tab-1" />
Members
| Property Name | Type | Default | Comment | | disabled | boolean | false |
| selected | boolean | false |
| text | string | undefined | undefined |
| value | string | |
| variant | string | '' |
Considerations
- When the parent TabList is disabled, the Tab is also disabled.
- Includes HTMLButtonElement props, event, and methods
Anatomy
<button class="sterling-tab">
<slot {disabled} {selected} {text} {value} {variant}>
<div class="text">{text || value}</div>
</slot>
<div class="indicator" />
</button>