Skip to main content

Segment

Displays a segmented control for single selection (generally when the total number of options is fewer than 6).

KeyTypeDescriptionRequiredDefaultMin Version
optionsarray of dictOptions list*

Each option dict has:

KeyTypeDescriptionCondition
titlestringOption titleLocalizable
valueprimitiveSaved value; defaults to title if omittedOptional

This component does not support icon.

Return TypeDescription
primitiveSelected option value

Example

{
default = "Green";
label = "Segmented options";
cell = "Segment";
key = "list-segment";
options = {
{ title = "Red"; };
{ title = "Green"; };
{ title = "None"; };
{ title = "Leak"; };
};
};

XUI-Segment.png