RadioInput()function
RadioInput({
name,
title,
placeholder = title || "Choose",
required = false,
disabled = false,
message = "",
value = false,
onValue,
children,
...props
}: RadioInputProps): ReactElement| Param | Type | |
|---|---|---|
props | RadioInputProps | Props for RadioInput, a single labelled radio button styled as an input. required |
| Return | |
|---|---|
ReactElement | A <label> wrapping the radio button and its label content. |
Single <input type="radio"> wrapped in a <label> styled as an <Input>.
- Calls
onValue(true)when selected; label content comes fromchildren, falling back toplaceholder/title.
Examples
<RadioInput name="plan" value={isPro} onValue={selectPro}>Pro</RadioInput>