To create a tab navigation, use the <TabNav>
and <TabNavItem>
components.
active
default
name
active
true
to make the tab active (optional). Only use if you want to control the active tab from outside.default
start
end
<script lang="ts">
import { TabNav, TabNavItem } from '@hyvor/design';
let active = 'settings';
</script>
<TabNav bind:active={active}>
<TabNavItem name="settings">
<IconGear slot="start" />
Settings
</TabNavItem>
<TabNavItem name="seo">
<IconSearchHeart slot="start" />
SEO
<Tag size="x-small" color="green" slot="end">80%</Tag>
</TabNavItem>
<TabNavItem name="links">
<IconLink45deg slot="start" />
Links
</TabNavItem>
</TabNav>