Skip to main content

RadioGroupField


Example

Your favourite color:
<RadioGroupField
orientation="vertical"
label="Your favourite color:"
name="favourite-color"
value={value}
onChange={setValue}
options={[
{
value: "Green",
label: "Green",
},
{
value: "Blue",
label: "Blue",
},
{
value: "Red",
label: "Red",
},
]}
/>

Props

NameTypeDefault ValueRequiredDescription
namestringNo
valuestring | number | booleanYes
onChange(value: A) => unknownYes
onBlur() => unknownNo
labelstringYes
issuesNonEmptyArray<Children>No
disabledbooleanNo
assistiveTextChildrenNo
autoFocusbooleanNo
hintstringNo
hintPlacement"bottom" | "left" | "right" | "top" | "bottom-end" | "bottom-start" | "left-end" | "left-start" | "right-end" | "right-start" | "top-end" | "top-start"No
optionsRadioOption<A>[]Yes
orientation"horizontal" | "vertical"No

Related components