Reference Field Reference
fields.radioGroup()
Single-choice radio group, displayed as a tab-style layout. No default-value option today.
Single-choice radio group. Maps to editor { name: 'str-radio-group', type: 'str-radio-group' } — note this is one of the few editors where the wire name and type are the same string. Output is the literal union of options[].value — the same <const O> pattern as fields.select(), but always single-value (no multi mode).
Example
fields.radioGroup({
label: 'Layout',
options: [
{ name: 'Grid', value: 'grid', icon: 'grid' },
{ name: 'List', value: 'list', icon: 'list' },
] as const,
})
// _output: 'grid' | 'list'Options
| Option | Type | Required | Description |
|---|---|---|---|
label | string | Yes | Label shown to editors in Strife Studio. |
options | { name: string; value: string; icon?: string }[] | Yes | The radio choices. |
description | string | No | Tooltip shown to editors. |
searchable | boolean | No | Include in the team's search index. |
filterable | boolean | No | Allow filtering content lists by this value. |
protected | boolean | No | Restrict editing to users with the appropriate permission. |
propertyName | string | No | Override the stored property name. |
No localizable option.
The Studio-UI Radio Group reference lists a "Default value" setting, and the underlying wire format does support a defaultValue on the editor. fields.radioGroup() does not currently expose a defaultValue option — there's no way to set one from the DSL today. If you need a preselected value, set it directly on the template in Strife Studio after pushing (with the same reset-on-next-push caveat as other Studio-only settings).
Output type
O[number]['value'] — the literal union of options[].value.
See also
- Radio Group — the same editor, documented from the Strife Studio UI side.