Skip to main content

Toggle

The toggle component allows you to get a boolean from the user.

Toggle API

The following section details Toggle component's specific settings. For more details on the App Editor, check the dedicated documentation or the App Editor Quickstart:

Toggle configuration

NameTypeConnectableTemplatableDefaultDescription
labelstringtruefalseLabelThe toggle label.
default valuebooleantruefalseThe default value of the toggle.
DisabledbooleanfalsefalsefalseWhether the toggle should be disabled.

Outputs

NameTypeDescription
resultbooleanThe state of the toggle.

Event handlers

The toggle component has the following event handlers:

  • onSuccess: Trigger one or more runnables when the user toggles the switch and the value is true.
  • onToggle: Trigger one or more runnables when the user toggles the switch.