Select All

No dependencies
Code format

Install with shadcn

Needs a free account token. Get a token

npx shadcn@latest add @movin/checkbox-select-all

About this component

A parent checkbox over a branch of children. Checking the parent cascades down the branch one child after another; checking only some children turns the parent into an animated half-state dash that becomes a tick when the last one is done.

Triggers

  • Click
  • State change
  • Delay stagger
  • Draw
  • Morph

Techniques

  • SVG stroke
  • stroke-dashoffset
  • Stagger
  • State machine
  • CSS transition

Difficulty

Intermediate

Accessibility

Keyboard and screen readers

Real native checkboxes in a role="group" with a label; the parent uses the native indeterminate state, which screen readers announce as mixed. Each row's text names its checkbox.

Reduced motion

The cascade is instant.

Use it in anything you build, commercial and client work included. Licence

More checkboxes

See all
SmileGet code
Today0 of 4 done
Sorting ListGet code
SproutGet code
StitchGet code