Related components
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
| Prop | Type | Default | Required |
|---|---|---|---|
appearance | "standard" | "modern" | - | - |
as | JSX.IntrinsicElements | - | - |
asChild | boolean | - | - |
checked | boolean | - | - |
defaultChecked | boolean | | - |
description | string | - | - |
error | string | - | - |
hideLabel | boolean | - | - |
label | string | - | |
onCheckedChange | (checked: CheckedState) => void | - | - |
prompt | { link?: string | undefined; label: string; onClick?: (() => void) | undefined; } | - | - |
required | boolean | - | - |
size | "md" | "lg" | - | - |
state | "error" | - | - |
validation | ValidationOptions | - | - |