1. framework components
  2. segmented control

Segmented Control

Capture input for a limited set of options.

Label

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:

tsx
import { SegmentedControl } from '@skeletonlabs/skeleton-react';

export default function Anatomy() {
	return (
		<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 react/segmented-control

View page on GitHub