Skip to content

RadioButtonField

A single radio input for assigning a specific value to a command property.

RadioButtonField infers the allowed setValue type from the bound accessor. That keeps each radio option aligned with the command property it updates.

PropTypeDefaultDescription
value(instance: TCommand) => TValueRequired. Accessor function returning the property value from the command instance.
setValueTValueRequired. Value assigned when the radio button is selected. The type is inferred from value.
labelReact.ReactNodeContent displayed next to the radio button.
titlestringThe label for the field (shown when showTitles is enabled).
requiredbooleanOverride automatic required detection.
disabledbooleanfalseDisables the radio button.
<RadioButtonField
value={(c: NotificationPreferences) => c.contactMethod}
setValue="email"
label="Email"
title="Preferred Contact Method"
/>
<RadioButtonField
value={(c: NotificationPreferences) => c.contactMethod}
setValue="sms"
label="SMS"
/>