Launch sale — 60% off Pro
Contact
CheckboxStandard

Not affiliated with official shadcn/ui. Visit ui.shadcn.com for official docs.

React Checkbox - Nested List

A React nested checkbox list with parent-child relationships where parent controls all children for hierarchical selections using shadcn/ui

Looking to implement shadcn/ui patterns?

Join our Discord community for help from other developers.


Select-all controls need to show what they're selecting. This React nested checkbox list creates parent-child hierarchy where clicking parent checks or unchecks all children, and children affect parent state. Built with shadcn/ui using useState tracking each checkbox independently with handleParentChange synchronizing children. The ml-6 indentation visually nests children under parent, font-semibold distinguishes parent importance. Perfect for feature bundles, permission groups, category-based selections, or any interface where options have hierarchical relationships requiring coordinated selection.

Pattern created by @haydenbleasel

Installation

Questions you might have