Skip to main content
This component is returned by useForm().

Example

radio-group-dialog.tsx

Adding a legend

To add a legend to your radio group, wrap it in a <Fieldset />:

Props

string
required
The path to the string value of the radio group field in your form schema.e.g. "department", "shipping.method"
boolean
Whether or not the radio group should be disabled.Defaults to false (not disabled).
React.ReactNode
required
The <RadioGroup.Item />s representing the available options.
A <RadioGroup /> component should only have <RadioGroup.Item />s as children.

<RadioGroup.Item />

A radio group item representing a single selectable option.

Props

string
required
The value of the radio item that will be stored in the form when selected.
string
required
The label displayed next to the radio item.