Combines a Checkbox with a Label and InlineMessage

CheckboxField renders a Checkbox inside an InlineFieldWrapper, providing a consistent layout for a checkbox, label and, when applicable, an error.

<Form>
<CheckboxField label="Do you like checkboxes?" name="likeCheckboxes" />
</Form>

API Reference

PropTypeDefaultRequired
defaultChecked
boolean

-

asChild
boolean

-

-

checked
boolean

-

-

required
boolean

-

-

onCheckedChange
(checked: CheckedState) => void

-

-

state
"error"

-

-

cssCSSProperties

-

-

labelstring

-

error
string

-

-

prompt
{ link: string; label: string; }

-

-

description
string

-

-

hideLabel
boolean

-

-

validation
ValidationOptions

-

-