CheckboxInput()function

CheckboxInput({
	name,
	title,
	placeholder = title || "Yes",
	required = false,
	disabled = false,
	message = "",
	value = false,
	onValue,
	children,
	...variants
}: CheckboxProps): ReactElement
ParamType
variantsCheckboxProps
Props for CheckboxInput, a boolean-valued checkbox input. required
Return
ReactElement
A <label> wrapping the checkbox and its label content.

Checkbox input bound to a boolean value, rendered as a labelled <input type="checkbox">.

  • The label content comes from children, falling back to placeholder/title.

Examples

<CheckboxInput name="agree" value={agree} onValue={setAgree}>I agree</CheckboxInput>