Calm motion: animations on this site only fade, with no movement
Course card
A course with the picture, the teacher, the number of lessons, the level, and the progress
Shows a course in a catalog or in the list of courses that a learner takes. For the lessons inside one course, use the lesson path.
Basic
titleis the name of the course. If you sethref, the title is a link and the whole card takes the click.imageis the picture on top. Setimage-altonly if the picture tells more than the title.teacher,lessons,duration, andlevelshow as a short line of facts. Each one is optional.progressis the share that the learner did, from 0 to 100. A bar and a line of text show it. At 100, the card says "Finished". Leave it out before the learner starts.- Change the words with
labelsor a label pack. The API table lists the keys.
Usage
ts
import { BlessCourseCard } from "blessing-ui";API
Props
| Name | Type | Default | Description |
|---|---|---|---|
title* | string | — | |
href | string | — | |
image | string | — | |
imageAlt | string | "" | describe the image; leave empty when the title says enough |
teacher | string | — | |
lessons | number | — | |
duration | string | — | the length as text, for example "6 h 30 min" |
level | string | — | |
progress | number | — | the share of the course that the learner did, 0 to 100; leave it out before they start |
labels | Partial<{ by: (name: string) => string; lessons: (n: number) => string; level: string; done: (pct: number) => string; finished: string; }> | — |