Calm motion: animations on this site only fade, with no movement
Lesson path
The lessons of a course as a path, done, current, or locked
Shows a learner where they are in a course and which lesson comes next. The nodes swing left and right, so the list reads as a path. For the steps of a form, use the stepper.
Basic
lessonsis a list of lessons in order. Each lesson has anid, atitle, and an optionalmetaline anddone.- The first lesson that is not done is the current one. The lessons after it are locked.
- Each state has a mark and a word: ✓ and "done", ▶ and "start here", or a lock and "locked". The state does not rest on the color.
- A click on a done or current lesson emits
selectwith its id. A locked lesson is a disabled button. - The path is a navigation region with a line that counts the done lessons. Change the words with
labelsor a label pack:title,done,current,locked, andprogress(a function).
Usage
ts
import { BlessLessonPath } from "blessing-ui";API
Props
| Name | Type | Default | Description |
|---|---|---|---|
lessons* | BlessLesson[] | — | in order; the first lesson that is not done is the current one, and the ones after it are locked |
labels | Partial<{ title: string; done: string; current: string; locked: string; progress: (done: number, total: number) => string; }> | — |
Events
| Name | Payload | Description |
|---|---|---|
select | [id: string] |