Skip to content

Toggle button

An adaptive toggle button

Component

Name Description
component toggle-button
id Unique id used to store data
value initial value
options options

Options

Ensure to provided onValue and offValue so that the toggle button can translated and match proper value. Without them, it will be just true/false.

Name Description
onValue value to use when toggle button is on
offValue value to use when toggle bugton is off

Example

{
    "component": "toggle-button",
    "id": "status",
    "value": "active",
    "options": {
        "onValue": "active",
        "offValue": "retired"
    }
}