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).

Stored value

array of strings — the selected option `value`s

Supports

  • Multi-select from a fixed list of options
  • Horizontal, compact visual style
  • Default selection via `default` array

Config options

options{ value, label }[]
The choices. Required.
defaultstring[]
Pre-selected values. Empty array if omitted.

Example

json
{ "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" }

Gotchas

Heads up
Not single-select. For a segmented single-choice control use `toggle-group` — `button-group` stores an ARRAY of values.