Design system

Checkbox

A control for choosing one or more independent options.

Use a checkbox when a choice is independent and can be selected alongside other choices. For a single immediate on/off setting, use a switch instead.

Built on Radix UI CheckboxUpstream API

Keep related documents with the work order.

Attachments are included.

Import

import { Checkbox } from "@workshop1/ui/components/checkbox"

States

Checkboxes support checked, unchecked, disabled, and invalid states. Use a controlled checked value when the surrounding form needs to react immediately to the choice.

Accessibility

Give every checkbox an accessible name with a visible Label connected by htmlFor. Keep supporting text outside the label when it describes the result of the choice.

Best practices

  • Phrase the label as a choice, not a question with an ambiguous answer.
  • Use a group label when several checkboxes belong to one field.
  • Do not use a checkbox for navigation or an action that happens immediately.