GCBGutenberg
Control Blocks
Buy

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-group if you need a compact segmented look

Config options

OptionTypeDefaultDescription
options{ value, label }[]The choices. Required.
defaultstringPre-selected value. Should match one of the option values.

Gotchas

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

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

Every field also takes the keys common to all fields.

Built from GCB Lite 0.4.0 (ce232d4). Source: schemas/controls/radio.md.

Copyright © 2026 Runchain. WordPress is a trademark of the WordPress Foundation.