Skip to content

Segmented

A single-select linear segmented control for light filtering / view switching, role="radiogroup", with per-item disabling.

Basic usage

Basic usage

Default selection

Controlled value

Disabled items

Disabled options

Switch event

oas-change event

Currently selected: chart

API

Attributes

AttributeDescriptionTypeDefault
options[{ label, value, disabled? }] JSON stringstring[]
valueSelected value (defaults to the first option; controlled)string

Events

EventDescription
oas-changeSwitched, detail: { value }

The container is role="radiogroup"; each item is role="radio" + aria-checked / aria-disabled.