Checkbox
Checkbox represents a Boolean choice or one option within a multi-select group.
Purpose
Checkbox represents one Boolean decision or one option in a multi-select group.
Labeled checkbox
Installation
With the Siteplane registry alias configured, add the component and import the installed source from your app.
CLI
pnpm dlx shadcn@4.16.1 add @siteplane/checkboxImport
import { Checkbox } from "@/components/ui/checkbox";
import { CheckboxGroup } from "@/components/ui/checkbox-group";Need the machine-readable source metadata? View registry JSON.
Usage
Use Checkbox for a labeled boolean choice. Checked and unchecked are states of the same primitive.
import { Checkbox } from "@/components/ui/checkbox";
import { Field, FieldDescription, FieldLabel } from "@/components/ui/field";
export function Example() {
return (
<Field>
<FieldLabel>
<Checkbox defaultChecked />
Receive product updates
</FieldLabel>
<FieldDescription>
You can change this setting later in your profile.
</FieldDescription>
</Field>
);
}Examples
States, sizes, groups and form integration stay together so the choice model remains clear. Form examples use Field and Form for labels, errors and submitted state.
States
Sizes
Checkbox group
Card choice
Form integration
API Reference
The reference lists the source-owned exports and props that are easy to miss in visual examples. Inherited Base UI props remain available unless the wrapper narrows them.
- Use controlled
checkedandonCheckedChangeor uncontrolleddefaultChecked. indeterminaterepresents a mixed parent state; it is not a selected value.sizeaccepts"sm","default","lg", and"xl"and otherwise inheritsSiteplaneUIProvider controlSize.- Use Checkbox Group for related multi-select options.
Motion
Component motion uses the shared Siteplane motion contract. See the global motion guide for provider setup, tokens and reduced-motion behavior.
- Checked and indeterminate indicators use native checkbox motion and central exit tokens.
- Reduced motion moves the indicator directly to its final state.
- Pointer, hover, focus, invalid, and disabled states remain native.
Accessibility
- Every Checkbox needs visible label text or an accessible label.
- Connect invalid state to the Checkbox and render a visible
FieldError. - Make row or card compositions clickable without replacing Checkbox semantics.
- Use indeterminate state only to summarize partial child selection.
Implementation Guidance
- Do not use raw checkbox inputs for visible Siteplane controls.
- Use Checkbox Group for related options.
- Preserve native indicator, focus, cursor, invalid, disabled, and motion behavior.