Skip to content
Browse docs and components

Checkbox

checkbox

A single choice with a visible label wired to it for a screen reader. Carries a destructive variant for choices that cannot be undone, and the box itself fills with the accent when checked so the state is readable at a glance.

Responsive

Install

$npxshadcnadd@forme/checkbox

Adds the component, its registry dependencies, and the token stylesheet you import once.

Usage

import { Checkbox } from "@/components/forme/checkbox/checkbox";

<Checkbox label="Send me product updates" />

When to use

Reach for it

  • Options in a form that apply when it is submitted, and lists where several can be picked.

Use something else

  • Settings that apply instantly; use a Switch.
  • One choice out of several; that is a RadioGroup.

API reference

Read from the source, so it is the API of the file you install. A prop marked * is required.

Checkbox

A checkbox and its label are one component, not two.

PropTypeDefaultDescription
labelReact.ReactNode—The visible label. Rendered beside the box and wired to it for a screen reader.
destructiveboolean—Renders destructive: a red box for a choice with consequences.

Also takes every prop of Omit<CheckboxRootProps, "children">.

Accessibility

  • The label is part of the component and tied with aria-labelledby, so the text is part of the click target.