checkbox Component

Use the checkbox component for options selection, such as an "on"/"off" state for a preference or setting.

{
  "type": "checkbox",
  "text": "Tick me!"
}

Properties

text
STRING [getter]
Recommended

The text displayed to the right of this checkbox.

checked
BOOL [getter]
Default: false

Set the state of the checkbox to checked or unchecked.

Also see Shared Properties.

Event Triggers

This component dispatches the following event triggers:

Trigger Description
"changed" When the checkbox state has changed.

Examples

Play a sound when changed

{
  "type": "checkbox",
  "text": "Tick me!",
  "checked": true,
  "events": [
    {
      "triggers": "changed",
      "action": {
        "type": "json",
        "src": {
          "sound": {
            "src": "Funk"
          }
        }
      }
    }
  ]
}