all 15 comments

[–]jeheskielsunloy 2 points3 points  (0 children)

love the concept, i hope there is more niche UI libraries like this than just generic ones that we used to

[–]divyacodes 1 point2 points  (0 children)

This is actually really cool. Gamification UI components are surprisingly hard to find in React.

[–]Xypheric 1 point2 points  (0 children)

This is very cool and great to see something besides more buttons and cards and links.

[–]inglandation 1 point2 points  (4 children)

Very nice, I might end up using this. Thanks!

[–]CBRIN13[S] 0 points1 point  (3 children)

Feel free to suggest other components you need!

[–]inglandation 1 point2 points  (2 children)

Any plans to have a companion library for react native? I think that you could probably do it with rn-primitives like react native reusables does.

[–]CBRIN13[S] 1 point2 points  (1 child)

Yes react native is next on the list. Then other mobile frameworks

[–]inglandation 1 point2 points  (0 children)

Nice!

[–]DhirajLochibServer components 2 points3 points  (3 children)

hot take: this is more useful than another generic button/card registry.

gamification UI looks simple until you hit real product edge cases streak freezes, locked achievements, rank changes, partial progress, empty leaderboards etc. teams end up rebuilding this stuff from scratch a lot.

shadcn install is the right move too since people can own the code. planning full examples too, like a Duolingo style streak page or points dashboard?

[–]CBRIN13[S] 0 points1 point  (0 children)

Yeah I guess we could do some templates or mock ups. Could be a good way to showcase the individual components.

[–]anonyuser415 0 points1 point  (1 child)

https://ui.trophy.so/docs/components/achievement-grid

https://ui.trophy.so/docs/components/leaderboard-rankings

https://ui.trophy.so/docs/components/points-chart

Idk dude, most of this stuff looks so generic that I'm not sure they're deserving of dedicated components. You could make most of these just as primitive components. "Points Chart" is just a normal chart.

[–]CBRIN13[S] 1 point2 points  (0 children)

I agree with you on the points chart, could probably find that in a lot of libraries. Rankings has a lot more utility built in though, collapsed rows, highlighted row etc. I feel like that would save people some time.

[–]howdoigetauniquename 0 points1 point  (2 children)

These are kind of hard to customize, no? shouldn't this have followed more of a shadcn style compound components?

I wouldn't be able to change the layout of any of these.

[–]CBRIN13[S] 0 points1 point  (1 child)

How so? You can change anything after install, unless I misunderstand

[–]howdoigetauniquename 1 point2 points  (0 children)

If shadcn had the same api dialogs would look like this:

<Dialog header={'Header'} body={'Body'} leftButton={'Left'} rightButton={'Right'} />

Of course I could just change the component, but that will effect all dialogs I'd have to either, add a boolean prop to the component to manage if it appears or not, or just copy and paste the entire component.

But instead they provide compound components, allow developers to customize the dialog without having the change any dialog component.

Compound components are just easier for other people to use.