Checkbox
Binary or ternary selection control. Supports checked, unchecked, indeterminate, and disabled states. Use for multi-select lists, settings, and form agreements. For a single boolean with immediate effect, prefer Switch.
a11y (built in): the control is a real <input type="checkbox"> restyled with appearance: none, never a div — :checked, :indeterminate and disabled stay native state, so role and keyboard toggling come from the platform rather than from ARIA. Input and .lb-checkbox__label sit inside one wrapping <label>, which supplies the accessible name and makes the text a click target; the check/minus glyphs injected at init are aria-hidden decoration shown by CSS sibling combinators, and focus draws the system :focus-visible outline.
Usage: Author only the bare control — <label class="lb-checkbox-wrap"><input type="checkbox" class="lb-checkbox"><span class="lb-checkbox__label">…</span></label>; with js/lb.js loaded, LB.init() (self-runs on DOMContentLoaded) wraps the input in a .lb-checkbox-frame and injects the glyph spans — never hand-write the frame or glyphs. Wiring stays native: listen for change, read input.checked, and set input.indeterminate = true from JS for the ternary state (a DOM property, not an attribute). No custom events and no instance handle; for checkboxes injected after boot, run the exported LB.initCheckboxGlyphs(root) and then LB.initIcons(root) on the new subtree — the injected glyphs are empty data-lb-icon slots until the icon pass fills them; both calls are idempotent.