Skip to main content
5.0.1Next5.1.05.0.35.0.25.0.15.0.04.0.94.0.84.0.73.2.03.1.03.0.13.0.02.1.12.0.101.0.0
Version: 5.0.1

Segmented

A segmented control is a user interface element with distinct buttons for selecting options or navigating through categories. It simplifies the user experience by providing an intuitive and visually appealing way to make selections or switch between states.

This component is subject to change before final release. Design is not locked yet and might be updated.

Behaviour

Array of Strings

An array of strings represents the options in a segmented control component. Each string element in the array represents a distinct choice or category that users can select. The strings provide clear and concise labels for each option, allowing users to understand and make their desired selection within the segmented control. This simple and straightforward representation of options is commonly used when no additional properties, such as icons or titles, are required for the choices in the segmented control.

Array of SegmentedOption

An array of SegmentedOption represents options in a segmented control, accommodating cases where a simple string is insufficient and allowing for the inclusion of icons and titles for each choice.

type SegmentedOption = {
icon?: Icons;
title?: string;
}

API

Properties

PropertyDescriptionTypeDefault
optionsdefines the available choices as an array of strings or an array of custom SegmentedOption objects.(string SegmentedOption)[]-
selected-indexif given, the selected item at index in the control will be selectednumber-
sizeSize of the segmented control componentbase large small-
skinSkin set on the entire segmented controlSkinType.PRIMARYSkinType.PRIMARY

Events

NameTypeDescriptionExtra
atChangeCustomEvent<number>Emit index when clicked-

Details

Depends on