> From the [Strife developer docs](https://strife.app/docs/reference/field-reference/fields.radiogroup). Every page is listed in [llms.txt](https://strife.app/docs/llms.txt).

# 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()`](https://strife.app/docs/reference/field-reference/fields.select.md), but always single-value (no multi mode).

## Example

```ts
fields.radioGroup({
  label: 'Layout',
  options: [
    { name: 'Grid', value: 'grid' },
    { name: 'List', value: '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 }[]` | Yes      | The radio choices.                                         |
| `propertyName` | `string`                                           | No       | Override the stored property name.                         |
| `defaultValue` | one of `options[].value`                           | No       | The option shown as chosen while the field has no value. Studio doesn't save it. |

No `localizable` option.

> [!WARNING]
> `defaultValue` (since `@strifeapp/schema` 0.15.0) only decides which option Strife Studio shows as chosen while the field has no value. Studio doesn't save it, and clicking the option that already looks chosen does nothing, so the stored value stays empty until an editor picks another option. Treat a missing value as the default in your site.

## Output type

`O[number]['value']` — the literal union of `options[].value`.

## See also

* [Radio Group](https://strife.app/docs/reference/fields/radio-group.md) — the same editor, documented from the Strife Studio UI side.
