The value is checked, a boolean. Put the box first inside a Label, so the full row toggles it.
The sample also uses Label. One command adds them with this item:
terms-checkbox.tsx
Checkbox
<span>| Prop | Type | Default | Description | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| class | string | — | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| size | "default""lg" | — | default 16px, or lg 20px. Default: the CheckboxGroup size, else default. | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
From Base UICheckbox.RootBase UI docs | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| id | string | — | The id of the input element. | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| name | string | undefined | Identifies the field when a form is submitted. | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| form | string | — | Identifies the form that owns the hidden input. Useful when the checkbox is rendered outside the form. | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| ...props | <span> attributes | — | Every other attribute goes to the <span>, with a ref. | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Space | Checks or clears the box. |
|---|
- SwitchPick Switch for a setting that takes effect at once, with no Save button.
- LabelNames a control that is not in a Field, such as a checkbox or a switch row. It has the look of form labels and fades when its control is disabled.
- FieldPuts a label, a control, and one line of help or an error together. FieldSet groups several controls under one legend.
- TogglePick Toggle for a button that stays on or off in a toolbar, such as bold or mute, with the effect at once.
- Radio GroupPick Radio Group when people must pick exactly one option from a short list.









