EF
EF Design System

Checkbox

Checkboxes allow selecting one or more options. They support checked, unchecked, and indeterminate states with the primary accent gradient.

States

tsx
<Checkbox state="unchecked" label="Unchecked" />
<Checkbox state="checked" label="Checked" />
<Checkbox state="indeterminate" label="Indeterminate" />

Indeterminate (Select All)

The parent checkbox shows an indeterminate state when some but not all children are selected.

tsx
const allChecked = items.every(Boolean);
const noneChecked = items.every(v => !v);
const parentState = allChecked ? "checked" : noneChecked ? "unchecked" : "indeterminate";

<Checkbox state={parentState} onChange={toggleAll} label="Select All" />
{items.map(item => (
  <Checkbox state={item.checked ? "checked" : "unchecked"} ... />
))}

Disabled

tsx
<Checkbox disabled state="checked" label="Locked" />

Props

PropTypeDefaultDescriptionRequired
state"checked" | "unchecked" | "indeterminate""unchecked"Current visual stateNo
onChange(state: CheckState) => void-Callback on toggleNo
labelstring-Text labelNo
disabledbooleanfalsePrevent interactionNo

Usage Guidelines

  • Use checkboxes when users can select multiple items from a list.
  • Use the indeterminate state for "select all" controls with partial selection.
  • Always provide a visible label. Do not rely on the checkbox alone for meaning.
  • In forms, use checkboxes rather than toggles since forms require explicit submission.