shadcn.io is not affiliated with official shadcn/ui
Ranked Winners Team Block for React
A hackathon's three judged places as ranked rows with a big place numeral, the project, its team and judges' score, plus a people's-choice band with a vote toggle and its count.
Installation
Overview
A hackathon results section for React with Base UI, written for Alnwick, a fictional developer-events platform after its spring hackathon. A start-aligned header gives the weekend (18 and 19 April) and counts the people from the teams below. Three judged places follow as ranked rows that run rail to rail, each with + marks on its top rule: a big place numeral (1st, 2nd, 3rd, worked out from the judges' scores, best first), the project and what it does, its team as overlapping initials and names, the judges' score out of 50 and its stack. A people's-choice band ends the block with a vote toggle and its count. The vote stays in the page and adds one. On a phone the numeral sits above the project. It is built from Toggle, Avatar, Badge and Guides with your theme's tokens. The projects, scores and people are made up for the example.
FAQ
How do I change the projects, the teams and the scores?
Edit PROJECTS at the top of the file: a name, a sentence, a team, a stack and the judges' score. The rows are sorted by score, best first, and the place numerals (1st, 2nd, 3rd) come from that order, so you never type a place. OUT_OF is the top score. The header counts the people from the teams of the projects and the people's choice.
What does the vote do?
Nothing leaves the page: the toggle adds one to the count in this demo and says so ("counted in this demo"); pressing it again takes the vote back. To collect real votes, send the new state to your server in the toggle's change handler and start the count from what it returns.
How does the vote work with a keyboard and a screen reader?
It is a toggle button, so Space and Enter press it and it says whether it is pressed. Its name is "Vote for Afterparty map" plus the count, and a polite line under it reads the new total once. Pressed, the button inverts to the foreground colour.
Why are the rows an ordered list?
Because the order is the result. The list is an ol named "Judged places", each place's numeral is followed by the hidden word "place", and each project is a heading, so screen reader users can jump between them.
Related
- Pro
Awards Table Team
RecognitionA table of eight awards for a field-notes app: the winner, the category with a small drawn mark, the company year, and a button that opens the citation in place under the row.
- Pro
Counted Award Cells Team
RecognitionFour award categories as cells apart with overshoot: a drawn mark, a count that rolls up once, who gives the award, and the latest winner under a hairline.
- Pro
Sortable Side Projects Team
Interests and clubsEight side projects of a maker marketplace's team in a two-column hairline grid, each with stars, forks, a start month and stack chips, a sort by stars or newest and an accordion description.
- 213Pro
Three Step Podium Awards
Rankings and scoresA podium of three steps in the order 2, 1, 3, their heights in proportion to rank, a drawn medal on each and the award, programme and year above it.
- Pro
Class Plaques Hall of Fame Awards
People and teamsA hall of fame of seven open-source contributors in three inducted classes, each an engraved plaque with an oval monogram medallion, a one-line contribution and its class year.
- Pro
Avatar Podium Leaderboard Stats
LeaderboardsA 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.