shadcn.io is not affiliated with official shadcn/ui
Avatar Podium Leaderboard Stats Block for React
A contributor leaderboard with the top three on a podium of stepped cells with initials avatars, in the order second, first, third, and places four to eight as rows in one hairline frame.
Installation
Overview
A leaderboard with avatars for React with Base UI. A centred header states the total ("The top 8 landed 1,115 pull requests"), and one hairline frame with + marks on its corners holds the whole table. The top three stand on a podium in the order second, first, third, each in a cell of its own height whose top edge is a hairline, so the cells form a stair: an initials avatar (the leader's filled, the others' tinted), the name, the pull requests merged and an outlined numeral. Places four to eight run below as rows with a smaller avatar, the area the person works on in an outline badge, and the count. The ranks come from typed counts, so the order, the podium and the headline total always agree. The podium keeps its three cells on a phone, and the rows sit under it. For contributor rankings, sales boards, support scorecards and class standings.
FAQ
How do I change the people and the numbers?
Edit CONTRIBUTORS: a name, an area and the merged count. They are sorted and ranked when the module loads; the podium takes the first three and the rows the rest, and the headline total is summed from the same array. Initials come from the name (two words), so use AvatarImage inside each Avatar if you have photos; the initials stay as the fallback.
Why is the podium drawn 2, 1, 3 if the list reads 1, 2, 3?
The document order is first, second, third, which is how a screen reader reads it. Each cell is placed on the grid by its rank (the leader in the middle column), so only the picture is rearranged. Each name is a heading that starts with a visually hidden place ("First place: Ines Varga"), because the outlined numeral is a picture and the place has to be in the text.
Why no gold, silver and bronze?
Medals need three colours that work in every theme and still read for people who can't tell them apart. The block uses height, a hairline stair, a filled avatar for the leader and the numeral instead, in the theme's own tones, so it looks the same in a lime, a stone or a mauve preset, light or dark.
Is it accessible?
The podium and the rows are ordered lists, each named, and the avatars are decorative: the name is text next to them. Counts are in bdi elements so right-to-left pages keep them intact, and each carries a visually hidden "merged". The initials and the outlined numeral are hidden from assistive technology because the names and places say the same in words.
Related
- 213Pro
Leaderboard Podium Features
Metrics and chartsA leaderboard: a podium of the top three at different heights in foreground tones, set on the rule of a ranked table of eight with trend arrows, and a segmented control that ranks by adoption or by speed.
- Pro
Ranked List Leaderboard Stats
LeaderboardsA six-row ranking in a hairline frame with a Week and Month switch that re-ranks the table: a large numeral and a quiet tint for the leader, and points that roll to their new numbers.
- Pro
Movement Leaderboard Stats
LeaderboardsA league table with rank movement for eight clubs: an arrow, a word and a number (Up 4) and the two places as microcopy (7 to 3), with the biggest climber and the biggest faller beside it.
- Pro
Compact List Leaderboard Stats
LeaderboardsA league table for a pub-quiz league in a split: the header and three season facts at the start, and all twelve teams in dense rows, two columns of six, at the end.
- Pro
Grid Cards Team
Grids and wallsTwelve people of a restaurant-software company in a hairline grid that runs from rail to rail, each an initials avatar with a name, a role, a department badge and a city, under a department picker that brings the picked team to the front and dims everyone else.
- Pro
Trend Sparkline Leaderboard Stats
LeaderboardsA podcast chart in a reverse split: eight shows ranked by this week's listeners, each row with a line of its last eight weeks, the value and the change on last week as an arrow and a sign.