Checkbox
CCheckbox is the control for a setting that is on or off, and for one member of a set whose members are chosen independently of one another. It renders a box beside a label that it wires to the input itself, and it requires both a label and a model.
This page explains the model. Usage shows how to write one, and Reference lists every prop, event and attribute.
What the component settles
The box size, the corner and the gap to the label are fixed, as Geometry lists. The label is set in the caption role, the smaller of the two reading sizes, because a checkbox label sits inside a form rather than heading anything.
Checking paints the border and the fill from fill-secondary and the tick from fg-on-secondary, the pairing colour asks for, so a caller never writes it.
The label belongs to the control rather than sitting beside it. The component generates an id, puts it on the input and points the label at it, so clicking the words toggles the box and assistive technology reads the words as the name. That is what naming a control asks for, and it also makes the pointer target wider than the box.
One axis, and it is state
None of the props is an appearance axis. There is no size, no severity, no variant and no invalid, so the shared vocabulary is absent here rather than narrowed. What varies instead is state: unchecked, checked, indeterminate, disabled, read-only, hover and focus.
Hovering an unchecked box changes nothing. Only the cursor responds until the box is checked. Focus is also left to the interface, which draws one indicator for every control.
Binary or group, decided by one prop
Whether value is present decides what the model means. With no value, the checkbox is binary: the model holds trueValue when checked and falseValue when not. With a value, the checkbox is one member of a group: the model is an array, and checking appends while unchecking removes.
A group therefore shares one array, and nothing has to name the group for that to work. Usage shows both forms.
When a checkbox is the right choice
A checkbox suits a change that waits for a confirming action. It sits in a form beside a Create or a Save, and the value it holds takes effect when the form does.
It also suits a set of filters or sources where any number of options can be on at once, which a radio cannot express and a row of toggles overstates.
When something else fits better
A setting that takes effect the moment it is switched is a CToggle, because a toggle promises the change has already happened and a checkbox does not. One choice out of several mutually exclusive ones is a CRadio, or a CSegmented where the options are few and worth keeping visible.
A choice that has to report an error of its own needs something else too, since there is no invalid state, and so does a label that needs markup, since the label is plain text.
What the refusal costs
CCheckbox accepts no class, no style and no class-shaped prop under another name, which is the contract the layer sets. Positioning a checkbox is therefore a job for the element around it.
Three behaviours cost something at the call site.
Indeterminate is a display, not a third value. Clearing the dash after a click is the parent's work, because the component holds no state of its own.
Read-only looks exactly like enabled. A read-only checkbox needs a sentence nearby saying why it will not move, as Usage explains.
The interior of an unchecked box is painted surface-page whatever sits behind it. Inside a dialog or a card it is a visibly different shade from its background, the same step apart that separates those surfaces everywhere else, and no prop changes it.