1. framework components
  2. segmented control

Segmented Control

Capture input for a limited set of options.

Browse

You selected music

Icons

To adhere to accessibility best practices, include title and aria-label when using icon labels.

Orientation

Using the orientation prop to control the layout.

Anatomy

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

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

<SegmentedControl>
	<SegmentedControl.Label />
	<SegmentedControl.Control>
		<SegmentedControl.Indicator />
		<SegmentedControl.Item>
			<SegmentedControl.ItemText />
			<SegmentedControl.ItemHiddenInput />
		</SegmentedControl.Item>
	</SegmentedControl.Control>
</SegmentedControl>

API Reference

Unable to load component information for svelte/segmented-control

View page on GitHub