Checkbox
Usage
import Checkbox from "@repo/ui/Checkbox";
<Checkbox />;
Installation
npx the-dig@latest add Checkbox
Props
Use checked/onChange for controlled state or defaultChecked for uncontrolled state. Associate every checkbox with a visible <label>; data-indeterminate does not set the native indeterminate property.
| Prop | Type | Default |
|---|---|---|
className | string | - |
| Others | InputHTMLAttributes<HTMLInputElement> (e.g. onChange, disabled, etc.) | Document |
Disabled
import Checkbox from "@repo/ui/Checkbox";
<Checkbox defaultChecked disabled />;
Indeterminate
import Checkbox from "@repo/ui/Checkbox";
<Checkbox defaultChecked data-indeterminate />;