Checkbox

Toggle a value in a group or form.

Installation

import { Checkbox } from "~/components/ui/Checkbox";

Usage

<Checkbox defaultChecked />
<Checkbox />

API reference

PropTypeDefaultDescription
checkedboolean-Controlled checked state.
defaultCheckedbooleanfalseUncontrolled initial state.
onCheckedChange(checked: boolean) => void-Called when the state changes.
disabledbooleanfalseDisable the checkbox.

Accessibility

  • Built on the Base UI Checkbox primitive with role=checkbox and full keyboard support.
  • State is exposed via data-checked / data-disabled for styling.
View site