About this set
Checklists where a task has subtasks and the parent box reflects them. Collapsible subtasks is a restaurant’s summer menu launch with three tasks, each with a chevron button that shows or hides its subtasks, a count such as 2 of 3, and a guide line down the left of the nested list. Two-level checklist is a software release in three bordered cards whose subtasks hang from tree connector lines and are always visible. In both, ticking a parent ticks or clears all of its subtasks, ticking every subtask ticks the parent, and ticking only some of them puts the parent in the indeterminate state, drawn as a dash. The indeterminate state can only be set from JavaScript, so a script of about thirty lines keeps the parents, the counts and the disclosure buttons in step and announces the new count. Without the script every subtask stays visible and every box still works on its own. The plain version draws the tick and the dash with background images, Bootstrap uses the native .form-check-input:indeterminate style, and Tailwind uses the indeterminate: variant.
What’s included
- Parent checkbox ticks or clears all of its subtasks
- Indeterminate parent drawn as a dash when only some subtasks are done
- Collapsible subtasks with disclosure buttons and a count per task
- Two-level checklist with tree connector lines
- Subtasks stay visible and usable without JavaScript
Accessibility
Every task and subtask is a real checkbox with a label, and the parent's indeterminate property is exposed to screen readers as mixed. The chevrons are disclosure buttons with aria-expanded and aria-controls, named after their task, and a polite status region announces counts such as Print the menus: 3 of 3 subtasks done. Controls show a visible focus outline, and the chevron rotation and colour transitions stop under prefers-reduced-motion.
Customise it
Change --st-accent, --st-accent-dark, --st-guide and --st-box on .st for the boxes, counts and guide lines. Bootstrap uses the same variables on .form-check-input and .badge; in Tailwind swap the #be185d and #e3c3d0 colour utilities.





