Demos
Radio group
<Radio.Grouplabel="Radio Group:"on_change={({ value }) => {console.log('on_change', value)}}value="first"><Radio label="First" value="first" /><Radio label="Second" value="second" /><Radio label="Third" value="third" /></Radio.Group>
Vertical aligned Radio group
<Radio.Grouplabel="Vertical Group:"layout_direction="column"on_change={({ value }) => {console.log('on_change', value)}}><Radio label="First" value="first" /><Radio label="Second" value="second" /><Radio label="Third" value="third" checked /></Radio.Group>
Radio group with label above
<Radio.Groupverticallabel="Vertical Group:"layout_direction="column"on_change={({ value }) => {console.log('on_change', value)}}><Radio label="First" value="first" /><Radio label="Second" value="second" /><Radio label="Third" value="third" checked /></Radio.Group>
Radio group with status messages
<Radio.Grouplabel="Radio Group with status:"layout_direction="column"on_change={({ value }) => {console.log('on_change', value)}}><Radio label="First" value="first" status="error" /><Radio label="Second" value="second" status="Error message" /><Radiolabel="Third"value="third"checkedstatus="Info message"status_state="info"/></Radio.Group>
Plain Radio group
Without <Radio.Group>
. It is recommended to use the <Radio.Group>
if you are using React.
<FormRow label="Plain Radio group:"><Radiovalue="first"label="First"group="MyRadioGroup"on_change={({ value, checked }) => {console.log('on_change', value, checked)}}right/><Radiovalue="second"label="Second"group="MyRadioGroup"on_change={({ value, checked }) => {console.log('on_change', value, checked)}}right/><Radiocheckedvalue="third"label="Third"group="MyRadioGroup"on_change={({ value, checked }) => {console.log('on_change', value, checked)}}right/></FormRow>
With different sizes
As for now, there are two sizes. medium
is the default size.
<Radio size="medium" label="Medium" right="large" checked /><Radio size="large" label="Large" checked />
Disabled Radio Group
With label_position
set to left.
<Radio.Grouplabel="Disabled Group:"disabledlabel_position="left"name="MyGroup"><Radio label="First" value="first" /><Radio label="Second" value="second" /><Radio label="Third" value="third" checked /></Radio.Group>
Radio Buttons with a suffix
<Radio.Group label="With suffixes:" label_position="left"><Radio label="First" value="first" /><Radiolabel="Second"value="second"suffix={<HelpButton title="Modal Title">Modal content</HelpButton>}/><Radiolabel="Third"value="third"status="Error message"suffix={<HelpButton title="Modal Title">Modal content</HelpButton>}checked/></Radio.Group>