Field type
button-group
Multi-select shown as a row of pressable buttons. Same stored shape as checkbox-group — only the visual affordance differs (buttons-in-a-row vs checkboxes-in-a-column).
Type: button-group · Stored attribute type: array
Stored value
array of strings — the selected option values
Supports
- Multi-select from a fixed list of options
- Horizontal, compact visual style
- Default selection via
defaultarray
Config options
| Option | Type | Default | Description |
|---|---|---|---|
options | { value, label }[] | The choices. Required. | |
default | string[] | Pre-selected values. Empty array if omitted. |
Gotchas
- Not single-select. For a segmented single-choice control use
toggle-group—button-groupstores an ARRAY of values.
Example
{ "id": "ctrl_sizes",
"type": "button-group",
"label": "Sizes",
"attributeKey": "sizes",
"default": ["m"],
"options": [
{ "value": "s", "label": "S" },
{ "value": "m", "label": "M" },
{ "value": "l", "label": "L" }
],
"parentPanelId": "panel" }Every field also takes the keys common to all fields.