shadcn.io is not affiliated with official shadcn/ui
Judge Hover Card Awards Block for React
The jury of a hackathon cup as six cells on shared hairlines, each an initials avatar, a name, a role, a workplace and the fields judged, with a short bio in a hover card on hover, focus or touch.
Installation
Overview
A judge panel for React with Base UI. A centred header with a count taken from the list ("6 judges, 4 countries") sits above six cells on shared hairlines that run from rail to rail and end the block: three across from lg, two on a phone. Each cell has an initials avatar, the judge's name, role, workplace and city, and the fields they judged as small outlined tags. The name is a button that opens a hover card with a short bio, on hover and on keyboard focus; the bio is also in the cell for a screen reader, and shown in the cell where a hover card can't open, as on a touch screen. It's built from Avatar, Badge, Hover Card, Guides and your theme's tokens, with a CSS transition for the entrance. The Mosshurst Cup and the judges are made up for the example.
FAQ
How do I change the judges?
Edit JUDGES at the top of the file: each has a first and last name, a role, an org, a city and country, the judged fields as a list and a short bio. The header's count is taken from the list, so the number of judges and of distinct countries always matches the cells. Keep a multiple of three, or of two for the phone layout, so every row is full.
When does the hover card open?
On hover and on keyboard focus of the name button, and the cell is a large target because the button stretches over it. Escape closes it. On a touch screen the card isn't relied on: the bio is shown in the cell instead.
What does a phone user see?
Where the device can't hover, each cell shows its bio inline, clamped to four lines, so nothing depends on a hover card. Elsewhere the bio stays in the cell as hidden text and is read as the name button's description.
How do screen readers read a judge?
The judges are a list named "Mosshurst Cup judges". Each item has the name as a heading holding the button, then role and workplace, the city, a list of what the judge judged and the bio, read as the button's description. The avatar is decorative and hidden.
Related
- Pro
Judges Score Table Awards
Rankings and scoresA score sheet for a judging platform: five judges as columns with initials avatars, five weighted criteria as rows, the highest and lowest score of each row outlined, and weighted averages in the foot.
- “Pro
Jury Statement Awards
Press and quotesThe jury's statement for each category a legal-drafting tool won: the categories as a radio group at the start, the chosen one's statement as a large quote with its jurors' avatars at the end.
- Pro
Radar Scorecard Awards
One featured awardOne award scored in depth for an application-performance monitor: a radar chart of five criteria beside the same scores as a numbered list with bars, a derived total and the lead judge's comment.
- Pro
Hover Card Mosaic Team
Grids and wallsThe planners of an interior-planning studio as a mosaic of mixed spans that shares its hairlines: a two-by-two lead cell, two wide cells, three small ones and a +12 cell, each person a link with a hover card that opens on hover and on focus.
- 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
Category Grid Awards
Cards and gridsSixteen awards sorted into six categories on a 3 by 2 hairline grid: a drawn glyph, a derived count and the two newest awards named in each cell, the largest category outlined.