Skip to content

ToggleButton

toggle-button

Description

Provides toggle button for the user to select

Attributes

  • $data key/value pairs
    • display
    • value
    • icon
    • color
    • description
    • condition
  • enum flat list of values
  • $capture.mode: list | value
  • $capture.width: full | default

If mode is array then the toggle button is multi select.

Example

{
  "type": "string",
  "$capture": {
    "as": "toggle-button"
  },
  "$display": {},
  "title": "Toggle Button",
  "enum": [
    "val1",
    "val2",
    "val3"
  ],
  "$data": {
    "source": [
      {
        "display": "val1",
        "value": "val1",
        "icon": "heart",
        "color": "red",
        "tableData": {
          "id": 0
        }
      },
      {
        "display": "val2",
        "value": "val2",
        "icon": "start",
        "color": "black"
      }
    ]
  }
}