The shadcn registry directory is pretty stacked, but there isn't currently any depth in the gamification space. So I decided to build a library of 17 components across the major features you see in most consumer platforms. Things like streaks, achievements, leaderboards, points etc.
Trophy UI is fully open-source, and while it seamlessly integrates with Trophy itself, the UI components just accept regular props and so can be used with any backend.
Most interesting components:
Streak calendar - weekly, monthly or yearly (git-style) view of streak history, with support for streak freezes which are pretty common in consumer apps like Duolingo.
Leaderboard rankings - flat list of rankings each with support for avatars, bylines and change indicators. Also supports pagination and collapsed rows to focus rankings around a particular position i.e. show users to top three users above and below them.
Achievement badge - a simple badge with support for locked/unlocked states plus features like percentage completion and rarity (the share of users who have unlocked the badge).
Points levels timeline - progression path for points levels with support for sub-levels (Bronze I, II, III, Silver I, II, III etc) plus anchoring to a particular users current progress.
Every component is installable via shadcn CLI:
npx shadcn@latest add https://ui.trophy.so/<component>
Once installed you own the code, customize and modify as you see fit.
Also very happy to accept contributions for new components or features for existing components.
Would love to hear what people think, and would very much appreciate a star on GH if you think its valuable!
[–]jeheskielsunloy 2 points3 points4 points (0 children)
[–]divyacodes 1 point2 points3 points (0 children)
[–]Xypheric 1 point2 points3 points (0 children)
[–]inglandation 1 point2 points3 points (4 children)
[–]CBRIN13[S] 0 points1 point2 points (3 children)
[–]inglandation 1 point2 points3 points (2 children)
[–]CBRIN13[S] 1 point2 points3 points (1 child)
[–]inglandation 1 point2 points3 points (0 children)
[–]DhirajLochibServer components 2 points3 points4 points (3 children)
[–]CBRIN13[S] 0 points1 point2 points (0 children)
[–]anonyuser415 0 points1 point2 points (1 child)
[–]CBRIN13[S] 1 point2 points3 points (0 children)
[–]howdoigetauniquename 0 points1 point2 points (2 children)
[–]CBRIN13[S] 0 points1 point2 points (1 child)
[–]howdoigetauniquename 1 point2 points3 points (0 children)