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
labelReactNodenoneText next to the box.
descriptionReactNodenoneHelper line under the label.
checked / defaultCheckedbooleannoneControlled or initial state.
onCheckedChange(checked: boolean) => voidnoneCalled with true or false.
indeterminatebooleannoneShows a dash.
invalidbooleannoneError border.
disabledbooleannoneCan'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.