Checkbox
Binary choice with an indicator.
Import
tsx
import { Checkbox } from "@cooud-ui/ui";
bash
npx cooud-ui add checkbox
A controlled checkbox with an associated Label.
function CheckboxDemo() {const [checked, setChecked] = useState(true);return (<div className="flex items-center gap-3"><Checkboxid="terms"checked={checked}onCheckedChange={(value) => setChecked(value === true)}/><Label htmlFor="terms">Accept terms & conditions</Label></div>);}
A non-interactive checkbox.
<div className="flex items-center gap-3"><Checkbox id="disabled" disabled /><Label htmlFor="disabled">Unavailable option</Label></div>