Skip to content
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
  • title is the name of the course. If you set href, the title is a link and the whole card takes the click.
  • image is the picture on top. Set image-alt only if the picture tells more than the title.
  • teacher, lessons, duration, and level show as a short line of facts. Each one is optional.
  • progress is 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 labels or a label pack. The API table lists the keys.

Usage ​

ts
import { BlessCourseCard } from "blessing-ui";

API ​

Props

NameTypeDefaultDescription
title*string—
hrefstring—
imagestring—
imageAltstring""describe the image; leave empty when the title says enough
teacherstring—
lessonsnumber—
durationstring—the length as text, for example "6 h 30 min"
levelstring—
progressnumber—the share of the course that the learner did, 0 to 100; leave it out before they start
labelsPartial<{ by: (name: string) => string; lessons: (n: number) => string; level: string; done: (pct: number) => string; finished: string; }>—

Released under the MIT License. Character names and artwork belong to their owners.