Data Input

Switch

Definition

Captures an immediate on/off setting.

Usage

Use Switch for preferences that take effect as soon as they change.

Attributes

  • label or i18n required. Accessible setting label.
  • value required. Boolean value or writable state binding.
  • labelPosition. start or end.
  • labelSpacing. hug or spread.
  • isDisabled. Disables the switch.

Example

xml
<Switch label="Notifications" value="$settings.notifications" />