radio

Single-select shown as a vertical list of radio buttons. Stores the chosen option's `value` as a string.

Stored value

string — the selected option `value`

Supports

  • Single-select from a fixed list of options
  • Coerces option values to strings — pick from `toggle-group` if you need a compact segmented look

Config options

options{ value, label }[]
The choices. Required.
defaultstring
Pre-selected value. Should match one of the option `value`s.

Example

json
{ "id": "ctrl_layout",
  "type": "radio",
  "label": "Layout",
  "attributeKey": "layout",
  "default": "stacked",
  "options": [
    { "value": "stacked", "label": "Stacked" },
    { "value": "side",    "label": "Side-by-side" }
  ],
  "parentPanelId": "panel" }

Gotchas

Heads up
Option values are stringified before storage — `{ value: 1 }` becomes `"1"`. Compare with `String()` on the read side.
Heads up
For multi-select use `checkbox-group`. For a compact horizontal segmented control use `toggle-group`.