Skip to content
Hazine

Checkboxes and checklists

1 of 5 shipped. Each take is a different structure, and the note under its title says how.

  • checkboxes and checklists

    Two levels: the parent derives checked, unchecked or mixed from its children and sets them all when toggled. Children hang off a guide line under the parent, which carries a running count.

    shadcn add @hazine/checkbox-tree-mixed-parent

    Depends on @hazine/use-controllable-state, lucide-react, class-variance-authority

Planned 4

  • Checkbox Cards with Selection Limit

    Enforces a maximum: once the limit is reached the remaining cards stay focusable but become aria-disabled with an announced reason, and the counter doubles as the validation message for a minimum.

  • Checklist with Progress

    Adds derived state above the list (progress bar plus live count) and reorders items on completion into a disclosure, so the list is a tracker and not a form field.

  • Consent Checkbox Group

    Mixes required and optional checkboxes with per-item validation: required items carry a visible Required tag and aria-required, and errors are attached per checkbox and summarised in an alert.

  • Select All List Header

    The master checkbox lives in a header bar that swaps its content between a column title and a bulk action toolbar depending on selection; supports Shift+click and Shift+Space range selection.