ChoiceRadioInputscomponent

ChoiceRadioInputs(props: ChoiceRadioInputsProps<T>): ReactElement
ParamType
propsChoiceRadioInputsProps<T>
Props for ChoiceRadioInputs, which renders a radio for each entry in a ChoiceOptions set. required
    .optionsChoiceOptions<T>
Options for the radios. required
    .wrapboolean
Wrap the radios onto multiple rows if needed.
    .columnboolean
Display the radios in a column rather than a row.
Return
ReactElement
Element rendering one radio per option plus an optional empty placeholder radio.

Output a list of <RadioInput> elements for each item in a set of ChoiceOptions in { key: title } format.

  • This is the same type a ChoiceSchema uses for its .options field.
  • A placeholder option is shown at the bottom if required=false.

Examples

<ChoiceRadioInputs name="role" options={{ admin: "Admin", user: "User" }} value={role} onValue={setRole} />