Toggle
The toggle component allows you to get a boolean from the user.
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:
App Editor Documentation
The app editor is a low-code builder to create custom User Interfaces with a mix of drag-and-drop and code.
Apps Quickstart
Learn how to build your first app in a matter of minutes.
Controls
This component can be controlled by frontend scripts using these functions:
Name | Parameters | Description | Example |
---|---|---|---|
setValue | id: string, value: any | Manually set or force the value of a component. | setValue(id: 'a', value: 17) |
Toggle configuration
Name | Type | Connectable | Templatable | Default | Description |
---|---|---|---|---|---|
label | string | true | false | Label | The toggle label. |
default value | boolean | true | false | The default value of the toggle. | |
Disabled | boolean | false | false | false | Whether the toggle should be disabled. |
Outputs
Name | Type | Description |
---|---|---|
result | boolean | The 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 istrue
.onToggle
: Trigger one or more runnables when the user toggles the switch.