Skip to content
Forms

Checkbox

Turns an option on or off in a list, or picks several.

import { Checkbox } from "@flinbu/seed";

States

Changes go to the Seed Library file.
import { Checkbox } from "@flinbu/seed";

<div className="flex flex-col gap-sm">
  <Checkbox label="Include Dark" defaultChecked />
  <Checkbox label="Sync with Figma" description="Changes go to the Seed Library file." />
  <Checkbox label="Some components" indeterminate />
  <Checkbox label="Disabled" disabled />
</div>

Use it for

  • Options that apply when a form is saved.
  • indeterminate for a parent when some children are checked.

Use something else for

  • A setting that applies right away: use Switch.

Props

PropTypeDefaultDescription
labelReactNode–Text next to the box.
descriptionReactNode–Helper line under the label.
checked / defaultCheckedboolean–Controlled or initial state.
onCheckedChange(checked: boolean) => void–Called with true or false.
indeterminateboolean–Shows a dash.
invalidboolean–Error border.
disabledboolean–Can't be changed.

Accessibility

  • Built on Radix Checkbox: Space toggles, aria-checked reports true, false or mixed.
  • label and description are linked to the box.