StealThis .dev

LMS — Curriculum Accordion

A self-contained e-learning curriculum accordion where course modules expand to reveal their lessons. Each lesson row shows a type icon for video, quiz, or reading, its duration, and a tappable completion check. Module progress bars and an overall completion ring update live as you check lessons off, free-preview links open a toast, and locked modules unlock automatically once the previous module is fully finished.

Open in Lab
html css vanilla-js
Targets: JS HTML

Code

Curriculum Accordion

A focused, light-theme course outline for a fictional design course. The header pairs a difficulty pill and at-a-glance stats (modules, lessons, total runtime) with an animated SVG completion ring and a “Resume learning” button that jumps straight to your next unfinished lesson. Below it, each module is a collapsible card: tap the header to expand its lessons, and a slim progress bar plus percentage track how far you’ve come.

Every lesson row carries a colored type icon — play for video, question mark for quiz, book for reading — alongside its duration and a circular check-off button. Toggling a check animates the fill, recomputes that module’s progress and the overall ring, and raises a small toast. Some lessons expose a free “Preview” link. Locked modules sit dimmed behind a padlock and politely refuse to open until you finish the module before them, at which point they unlock automatically with a confirmation toast.

Toolbar controls let you expand or collapse every module at once, the first incomplete module opens on load, and the whole layout reflows to a comfortable mobile-first column down to ~360px. Interactive elements are real buttons with aria-expanded/aria-pressed state and visible focus rings, keeping it keyboard-usable and AA-readable.

Illustrative UI only — fictional courses, not a real learning platform.