kor TürkçeGitHub

Segmented

Switches between a few mutually exclusive options.

kor/ui/SegmentedSource

When to use

  • Switch the time range or display mode for the same data.

Examples

Switch units of time

Loading the example

<k:Segmented label="Period" selectedKey="day" change=".onChange">
	<core:Item key="day" text="Day"/>
	<core:Item key="week" text="Week"/>
</k:Segmented>

Switch between order totals

Loading the example

<k:Stack gap="10">
	<k:Segmented label="Report period" selectedKey="day" change=".onChange">
		<core:Item key="day" text="Today"/>
		<core:Item key="week" text="This week"/>
	</k:Segmented>
	<k:Stat label="Orders received" value="{/total}"/>
</k:Stack>

API

Properties

NameTypeDefaultDescription
selectedKeystringKey of the selected option
labelstringAccessible name

Aggregations

NameTypeDescription
itemssap.ui.core.Item[]Available options

Events

NameTypeDescription
changekey: stringSelection changed

Methods

NameDescription
setSelectedKey(key: string): thisSets the selected key and updates the indicator

Related

TabsRadioGroup