shadcn.io is not affiliated with official shadcn/ui
Achievement Notification Block for React
A medal shelf for a learning platform after a learner finishes a first project: eight drawn medals in a hairline grid with a New badge on the latest, and a popover on each medal with its criteria, a progress bar and the day it was earned.
Installation
Overview
Celebrate a finished project without a modal or confetti, with this achievement shelf for React with Base UI. It is Levelhut, a learning platform, in one hairline frame with a plus mark on each corner: eight medals in a grid, four across and two across on a phone. Earned medals are drawn solid with the day they were earned, the others are dashed with how far along they are, and the newest, Project Pioneer, carries a "New" Badge. Pressing a medal opens a Popover with its criteria, a Progress bar and the words for it ("2 of 3 answers done"); one popover is open at a time. A quiet Mark all seen button clears the badge. The count at the foot is worked out from the medals. Guides draw the lines. For learning, fitness and community products.
FAQ
Is anything recorded?
No. Which popover is open and whether the badge is cleared live in the page and reset on reload. The medals are typed in MEDALS with how much is done, how much is needed and the day each was earned; in your app fill them from your progress service and clear "New" when you record that the learner has seen it.
How does a medal show earned, in progress and locked?
Earned medals are drawn with a solid outline and a tint, the day below. Medals in progress and locked ones are dashed, with "2 of 3" or "Locked" below. The state is also written in words in the button's name and in the popover, so no state depends on a line style alone.
How do the popovers work?
Each medal is a button that opens a non-modal popover under it. Escape closes it and returns focus to the medal, opening another closes the first, and the popover keeps its size under reduced motion because its animation is switched off.
How are the medals drawn?
As one small SVG component: a ribbon, a circle and a glyph from a stroked path in a 24 by 24 box, all in the text colour. They are decoration, hidden from assistive technology, with the name and state in the button.
Related
- Pro
Medal Count Awards
Rankings and scoresAn Olympic-style medals table for a league-tables service: seven product lines ranked by gold, then silver, with drawn medal heads, a total, a stated ranking rule and a top-line callout.
- Pro
Dense Badge Wall Awards
Badges and sealsA wall of twelve drawn award badges on shared hairlines, four across, with a tally counted from the list and a show-all button on phones.
- Pro
Achievement Ribbon Banner
Stacked cardsA centred milestone card for a running app: a corner ribbon reading Unlocked, a trophy, a heading, one sentence, a track of five pips with three earned, the next milestone named, and a Shine Button.
- Pro
Achievement Trail Onboarding
Milestones and recapsA language-learning app's first-run trail: eight milestones along a winding path drawn from hairlines, three reached, a you-are-here ring, a hover card per node, a rolling count and progress, and a button that previews the next unlock.
- Pro
A subscriber milestone notice for a newsletter platform: 10,000 in a rolling number with a Replay from 9,999, a CSS ruler with ticks at 1k, 5k, 10k and 25k that names the next mark and what is still to go, and a thank-you post you can copy.
- Pro
A habit-app streak notice: the run in a rolling number, this week as seven day cells where today fills in when you press Mark today done, an Undo, and a Streak freeze switch that says in words what a missed day would do.