Calm motion: animations on this site only fade, with no movement
Achievements
Badges that a user earns, with the progress to the next ones
Shows the badges of a user in a grid, for a profile or a course. Earned badges are in full color. Badges not yet earned are gray, and some show how far along the user is. For one big number, use the stat.
Basic
3 of 6 earned
- First takeRecord your first episodeEarned 2 Nov
- Quiet roomRecord with no noise above −60 dBEarned 9 Nov
- First guestTalk with a guest on the showEarned 14 Nov
- Ten episodesPublish ten episodesNot earned yet
- Every weekPublish eight weeks in a rowNot earned yet
- Night owlPublish an episode after midnightNot earned yet
achievementsis a list of badges. Each badge has anid, atitle, anicon(an emoji or short text), and an optionaldescription.- If a badge has
earned, it is earned. The value is the time as text, and it shows as "Earned 14 Nov". - A badge that is not earned can have
progressas[now, goal]. It shows a native progress bar and the two numbers. - An earned badge has a solid edge and a shadow. A badge that is not earned has a dashed edge and says "Not earned yet". The state does not rest on the color.
- The line at the top counts the earned badges. Change the words with
labelsor a label pack:title,locked, and the functionsearnedandcount.
Usage
ts
import { BlessAchievements } from "blessing-ui";API
Props
| Name | Type | Default | Description |
|---|---|---|---|
achievements* | BlessAchievement[] | — | |
labels | Partial<{ title: string; earned: (when: string) => string; locked: string; count: (earned: number, total: number) => string; }> | — |