Skip to main content

<st-segmented-control>

JSON type: SegmentedControl

A row of mutually exclusive segments in a grey track, one of them lifted as white. Pass the segments as options and the chosen one as value; a segment-change event fires on choice. Keyboard: arrows move between segments, Home and End jump to the ends.

Usage​

import '@sankhyatronics/sankhya-cms/segmented-control'; // registers <st-segmented-control>

Properties​

PropertyAttributeTypeDefaultDescription
options—SegmentedOption[][]The segments, in order.
valuevaluestring''The chosen segment's value.
groupLabelgroup-labelstring''Names the group for assistive technology.

Events​

EventDetailDescription
segment-changeCustomEvent

See the live examples in Storybook.