Checkbox
A boolean toggle for yes/no, agree/disagree, or on/off choices.
Overview
The Checkbox field renders a single checkbox that produces a boolean true or false value. It is commonly used for terms of service agreements, opt-in consents, or any binary choice.
When required is set to true, the form cannot be submitted unless the checkbox is checked — useful for mandatory consent acknowledgements.
Properties
| Property | Type | Default | Description |
|---|---|---|---|
| type | string | — | The field type identifier (e.g. "text", "email"). |
| label | string | — | Human-readable label shown above the field. |
| name | string | — | Unique machine name used as the data key in submissions. |
| required | boolean | false | When true the form cannot be submitted without a value. |
| placeholder | string | undefined | Ghost text shown inside the input when empty. |
| defaultValue | any | undefined | Pre-filled value when the form loads. |
| hidden | boolean | false | Hides the field from the rendered form (still submitted). |
| disabled | boolean | false | Renders the field as read-only and non-interactive. |
| description | string | undefined | Helper text displayed below the field label. |
| className | string | undefined | Additional CSS class applied to the field wrapper. |
| checkboxLabel | string | undefined | Inline label displayed next to the checkbox (supports HTML). |
| defaultChecked | boolean | false | Whether the checkbox is checked by default. |
JSON Schema
{
"type": "checkbox",
"label": "Terms & Conditions",
"name": "agree_terms",
"required": true,
"checkboxLabel": "I agree to the Terms of Service and Privacy Policy",
"defaultChecked": false
}