1. framework components
  2. tabs

Tabs

Use tabs to quickly switch between different views and pages.

A concise overview of the project: usage, goals, and recent highlights. Use this area to orient readers with key metrics and links to deeper docs.

Controlled

Use the value and onValueChange props to control state programmatically.

A concise overview of the project: usage, goals, and recent highlights. Use this area to orient readers with key metrics and links to deeper docs.

Use the element slot to override the default button with an a tag for navigation tabs.

A concise overview of the project: usage, goals, and recent highlights. Use this area to orient readers with key metrics and links to deeper docs.

Fluid Width

Use flex utility classes to make the tabs stretch to fill the width of their container.

A concise overview of the project: usage, goals, and recent highlights. Use this area to orient readers with key metrics and links to deeper docs.

Orientation

Using the orientation prop to control the layout.

A concise overview of the project: usage, goals, and recent highlights. Use this area to orient readers with key metrics and links to deeper docs.

Direction

Set the text direction (ltr or rtl) using the dir prop.

A concise overview of the project: usage, goals, and recent highlights. Use this area to orient readers with key metrics and links to deeper docs.

Anatomy

Here’s an overview of how the Tabs component is structured in code:

svelte
<script lang="ts">
	import { Tabs } from '@skeletonlabs/skeleton-svelte';
</script>

<Tabs>
	<Tabs.List>
		<Tabs.Trigger />
		<Tabs.Indicator />
	</Tabs.List>
	<Tabs.Content />
</Tabs>

API Reference

Unable to load component information for svelte/tabs

View page on GitHub