Skip to content

Radio properties

PropertyTypeDescription
valuestring(required) defines the value as a string. Use it to get the value during the on_change event listener callback in the RadioGroup.
checkedboolean(optional) determine whether the radio is checked or not. Default will be false.
groupstring(optional) use a unique group identifier to define the Radio buttons that belongs together.
sizemedium
large
(optional) the size of the Radio button. For now there is medium (default) and large.
labelReact.ReactNode(optional) use either the label property or provide a custom one.
label_positionleft
right
(optional) defines the position of the label. Use either left or right. Defaults to right.
label_sr_onlyboolean(optional) use true to make the label only readable by screen readers.
statuserror
info
boolean
(optional) text with a status message. The style defaults to an error message. You can use true to only get the status color, without a message.
status_stateerror
info
(optional) defines the state of the status. It's two statuses [error, info]. Defaults to error.
status_propsVarious(optional) use an object to define additional FormStatus properties.
globalStatusVarious(optional) the configuration used for the target GlobalStatus.
innerRefReact.RefObject(optional) by providing a React.ref we can get the internally used input element (DOM). E.g. innerRef={myRef} by using React.createRef() or React.useRef().

Radio.Group properties

PropertyTypeDescription
valuestring(optional) defines the pre-selected Radio button. The value has to match the one provided in the Radio button. Use a string value.
namestring(optional) custom grouping name. Defaults to a random name.
layout_directioncolumn
row
(optional) Define the layout direction of the Radio buttons. Can be either column or row. Defaults to column.
sizemedium
large
(optional) the size of the Radio button. For now there is medium (default) and large.
statusstring
boolean
(optional) uses the form-status component to show failure messages.
status_stateerror
info
(optional) defines the state of the status. It's two statuses [error, info]. Defaults to error.
status_propsVarious(optional) use an object to define additional FormStatus properties.
globalStatusVarious(optional) the configuration used for the target GlobalStatus.
labelReact.ReactNode(optional) use either the label property or provide a custom one.
label_directionvertical
horizontal
(optional) to define the label layout direction on how the next element should be placed on. Can be either vertical or horizontal. Defaults to horizontal.
label_sr_onlyboolean(optional) use true to make the label only readable by screen readers.
verticalboolean(optional) will force both direction and label_direction to be vertical if set to true.

Radio group Context

You can also pass through label_position and some more Radio button properties to the Group. This way all nested Radio buttons will get the properties.