Checkbox

A 20px box with 4px corners. Unchecked uses Colors/input, checked uses Colors/action/primary.

Figma: 10 / Components / Checkbox

Usage

Source: src/components/ui/checkbox.tsx
import { Checkbox } from '@/components/ui/checkbox'
import { FieldRow } from '@/components/ui/field'
<FieldRow control={<Checkbox defaultChecked />}>Email me weekly results</FieldRow>

States

Unchecked, checked, indeterminate and disabled.

When to use

When to reach for it, and when to use something else.

Use it for

Complete: Several independent options.
Complete: Selecting rows in a table.

Avoid

Not complete: Settings that apply immediately; use a Switch.
Not complete: One choice from a list; use a RadioGroup.

Checkbox

PropTypeDefaultDescription
checkedboolean–Controlled state.
defaultCheckedbooleanfalseInitial state when uncontrolled.
indeterminatebooleanfalseShows that some, not all, are selected.
onCheckedChange(checked: boolean) => void–Called when the state changes.
disabledbooleanfalseBlocks interaction.

GoodUnited design system. The Figma file is the source of truth for every color, type size and component.

Made with Modulify