Toggle
11/19/26Less than 1 minute
Toggle
Button-group single-select. Use options (or the deprecated values alias) to supply the choices.
"fieldInput": {
"type": "toggle",
"options": {
"options": [
{ "label": "Yes", "value": true },
{ "label": "No", "value": false }
],
"labelKey": "label",
"valueKey": "value",
"storeValue": true
}
}Used by: toggle
Also available: all common options.
| Option | Type | Required | Default | Description | Example |
|---|---|---|---|---|---|
options | any[] | No | Array of option items rendered as toggle buttons | [{"label":"Yes","value":true},{"label":"No","value":false}] | |
values | any[] | No | Alias for options (deprecated — prefer options) | ||
labelKey | string | No | Object key used as the button label | "label" | |
valueKey | string | No | Object key used as the stored value | "value" | |
storeValue | boolean | No | Store option[valueKey] instead of the whole option object | ||
clearable | boolean | No | true | Clicking the active button again clears the value | |
color | string | No | "primary" | Color token applied to the active button | "primary", "secondary" |
size | string | No | "sm" | Size token for the buttons | "sm", "md", "lg" |