Skip to content

Booléen ​

Activation : schema type: "boolean".
Composant par défaut : UCheckbox. Avec toggle : USwitch.

API ​

NameTypeDefaultDescription
toggleBoolean—Si true, rend un USwitch à la place du UCheckbox.
checkboxObject—Pass-through → UCheckbox (ignoré si toggle).
switchObject—Pass-through → USwitch (si toggle).

Exemples ​

Case à cocher ​

json
{
  "type": "boolean",
  "title": "J’accepte les conditions"
}
json
{
  "type": "Control",
  "scope": "#/properties/terms",
  "options": {
    "checkbox": { "color": "primary" }
  }
}

Interrupteur ​

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

Playground ​

→ Boolean

Publié sous licence BSD-3-Clause.