kor TürkçeGitHub

Toggle

Turns a setting on or off.

kor/ui/ToggleSource

When to use

  • Use for a setting that takes effect immediately.

Examples

An on/off setting

Loading the example

<k:Toggle text="Show archived orders" change=".onChange"/>

Control dispatch alerts

Loading the example

<k:Toggle text="Delivery alerts" selected="true" help="Notify me when a carrier checks in." change=".onChange"/>

API

Properties

NameTypeDefaultDescription
selectedbooleanfalseWhether the switch is on
textstringLabel text
helpstringSupporting text
enabledbooleantrueWhether the switch can be used

Events

NameTypeDescription
changeselected: booleanThe switch state changed

Related

CheckSegmented