When to use
- Independent options
- Multi-select lists
- Acknowledgements and consent
Checkboxes capture independent yes/no choices or multiple selections from a set. Use them when each option can be selected without canceling another.
Start here before choosing examples or props. These notes explain where Checkbox helps, where another pattern is better, and what should stay true in product work.
import { Checkbox } from '@/components/ui/Checkbox';Native checkbox with label, helper text, and indeterminate state baked in.
Checkbox states should be easy to scan and programmatically clear. Use indeterminate only when a parent control summarizes a mixed group of child selections.
The option is available but not selected.
The option is selected and can be changed independently.
A parent option represents a mixed selection in a child group.
The option cannot be changed in the current workflow state.
A checkbox is small, but the label and group context carry most of the meaning. Keep the interactive target and the text close together.
The component accepts every native HTMLInputElement attribute on top of the design system props below.
| Prop | Type | Default | Description |
|---|---|---|---|
label | ReactNode | — | Visible label rendered beside the checkbox. Required for accessibility. |
helper | ReactNode | — | Secondary text below the label. Auto-wired to aria-describedby. |
indeterminate | boolean | false | Shows a dash icon. Use only when a parent checkbox summarizes a mixed child group. |
Each checkbox should stand on its own. Turning one option on should not automatically turn another option off.
When only one option can be chosen from a group, use radio buttons or select instead.
Use labels that describe the selected state, such as "Include inactive vendors" or "Send email updates".
For acknowledgement or consent, the checkbox label should contain the user commitment clearly.
What Checkbox does not do yet, and what consumers need to compose themselves.
Agents should use checkboxes for independent options and multi-select groups, not as a visual substitute for radio buttons, toggles, or submit actions.
import { Checkbox } from '@/components/ui/Checkbox';
<fieldset>
<legend>Notifications</legend>
<Checkbox
label="Send status updates"
name="notifications"
value="status-updates"
helper="Notify me when this request changes."
/>
</fieldset>Checkbox means independent selection. If selecting one option changes the meaning or availability of another option, document that relationship in the surrounding pattern.