Skip to content

RadioGroupField

A grouped radio input for selecting one value from a predefined set of options.

RadioGroupField infers each option value type from the bound accessor. That keeps every option aligned with the command property it updates.

PropTypeDefaultDescription
value(instance: TCommand) => TValueRequired. Accessor function returning the property value from the command instance.
optionsRadioGroupFieldOption<TValue>[]Required. Options rendered by the group. Each value must match the accessor return type.
direction'horizontal' | 'vertical''vertical'Layout direction for the options.
titlestringThe label for the field (shown when showTitles is enabled).
requiredbooleanOverride automatic required detection.
<RadioGroupField
value={(c: UserSettingsCommand) => c.role}
title="Role"
direction="horizontal"
options={[
{ value: 'reader', label: 'Reader' },
{ value: 'admin', label: 'Administrator' },
{ value: 'owner', label: 'Owner' }
]}
/>