Tabs
Use tabs to quickly switch between different views.
import { TabGroup, Tab } from '@skeletonlabs/skeleton';
Demo
Tabs utilize native radio groups to control state. Bind a shared group
value, then provide a unique value
per tab. Please note that using the panel
slot is optional.
Justify
Bottom Navigation
Using Svelte Stores
You may optionally choose to use Svelte writable stores to control your tab group state. Note the use of the $
sign
withing the bind:group
property. Pair this with Skeleton's
Local Storage Store for automatic persistence.
import { writable, type Writable } from 'svelte/store';
const tabSet: Writable<number> = writable(0);
<Tab bind:group={$tabSet} name="tab1" value={0}>(label)</Tab>