Component
Checkbox
Represent independent yes-or-no choices with keyboard support and controlled or uncontrolled state.
Interactive preview
Usage
Import the component entry and start with its smallest complete example.
Import
import { Checkbox } from "@chitrank2050/monoline-ui/checkbox"Basic usage
<Checkbox id="updates" checked={checked} onCheckedChange={(value) => setChecked(value === true)} />
<Label htmlFor="updates">Email product updates</Label>Usage guidance
Choose the component for its interaction model and semantics before customizing its appearance.
Checkbox represents an independent yes-or-no choice or a group-level indeterminate state.
The available choices are mutually exclusive, or one switch changes a setting immediately.
Checkbox provides keyboard and checked-state semantics. Pair it with a visible Label and associate any description or validation message explicitly.
This component needs browser JavaScript for state or browser APIs.
API reference
Props, slots, and callbacks available on this component.
Design tokens
Theme variables this component reads for color, spacing, and motion.
Implementation
The source used by the example above, including any state it needs.
<Checkbox id="updates" checked={checked} onCheckedChange={(value) => setChecked(value === true)} />
<Label htmlFor="updates">Email product updates</Label>Related documentation
Compare related components or review the package and theme setup.