Sorting List
Markup where the component goes, CSS in your stylesheet, script before </body>. In Vue, Svelte or Angular, call initCbSortList(el) on the mounted element instead.
Paste into Claude, ChatGPT or Cursor after filling in {{USER_STACK}}, {{USER_STYLING}} and {{USER_CONSTRAINTS}}. Neutral keeps the greys you see here; Match my project asks the model to map them onto your own colour tokens.
Install with shadcn
Needs a free account token. Get a token
npx shadcn@latest add @movin/checkbox-sort-listAbout this component
A short to-do list that tidies itself. Checking a task slides it down below the open ones while the others glide up into its place, and a progress bar over the list fills and counts; unchecking floats it back up.
Triggers
- Click
- State change
- Spring
- Fill
Techniques
- stroke-dashoffset
- Spring
- State machine
- CSS variables
Difficulty
Advanced
Accessibility
Keyboard and screen readers
Native checkboxes named by their task text. Focus stays on the checkbox you toggled after the list reorders. The "x of 4 done" count is aria-live="polite".
Reduced motion
Rows jump to their new place.
Use it in anything you build, commercial and client work included. Licence