Skip to content
Components / Controls

Checkbox

A binary choice that can sit in a form or a selection list.

@fabrials/ui
Loading state

Installation

  1. Import the control from @fabrials/ui, after setting the app up.

    TypeScript
    import { Checkbox } from "@fabrials/ui";
  2. Or install it under shadcn's name, so code that imports @/components/ui/checkbox gets this control. See shims.

    npx shadcn@latest add @fabrials/checkbox

API reference

Prop / exportTypeDescription
checkedbooleanControlled state.
onCheckedChange(checked) => voidCalled when the person toggles it.

Behavior

The label is a neighbour, not text inside the checkbox.

Accessibility

Keyboard and contrast
Keep visible labels, keyboard focus and status announcements when customizing. These components inherit your theme; maintain sufficient contrast in both color modes. The preview is keyboard operable.