Skip to content

Boolean ​

Trigger: schema type: "boolean".
Default component: UCheckbox. With toggle: USwitch.

API ​

NameTypeDefaultDescription
toggleBoolean—When true, renders a USwitch instead of the UCheckbox.
checkboxObject—Pass-through → UCheckbox (ignored when toggle is set).
switchObject—Pass-through → USwitch (when toggle is set).

Examples ​

Checkbox ​

json
{
  "type": "boolean",
  "title": "I accept the terms"
}
json
{
  "type": "Control",
  "scope": "#/properties/terms",
  "options": {
    "checkbox": { "color": "primary" }
  }
}

Switch ​

json
{
  "type": "Control",
  "scope": "#/properties/notifications",
  "options": {
    "toggle": true,
    "switch": { "size": "lg", "color": "success" }
  }
}

Playground ​

→ Boolean

Released under the BSD-3-Clause License.