Field type
radio
Single-select shown as a vertical list of radio buttons. Stores the chosen option's value as a string.
Type: radio · Stored attribute type: 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-groupif you need a compact segmented look
Config options
| Option | Type | Default | Description |
|---|---|---|---|
options | { value, label }[] | The choices. Required. | |
default | string | Pre-selected value. Should match one of the option values. |
Gotchas
- Option values are stringified before storage —
{ value: 1 }becomes"1". Compare withString()on the read side. - For multi-select use
checkbox-group. For a compact horizontal segmented control usetoggle-group.
Example
{ "id": "ctrl_layout",
"type": "radio",
"label": "Layout",
"attributeKey": "layout",
"default": "stacked",
"options": [
{ "value": "stacked", "label": "Stacked" },
{ "value": "side", "label": "Side-by-side" }
],
"parentPanelId": "panel" }Every field also takes the keys common to all fields.