shadcn.io is not affiliated with official shadcn/ui
Animated Grid Awards Block for React
Six awards for a UI kit as links in a 3 by 2 hairline grid: hover or focus one cell and it lifts while the other five settle into a tint.
Installation
Overview
A hover-and-focus award grid for React with Base UI. Six cells share their hairlines in a 3 by 2 grid that runs rail to rail under a start-aligned header with a tally counted from the list ("6 awards since 2022"). Each cell is one link: a medal on a ribbon drawn in SVG (every medal has its own motif on the face), the award as a heading, and the programme and year at the foot. Hover or focus a cell and it lifts into the card tone with a ring while the other five settle into a solid tint, so exactly one cell is picked out. The first row fades up once when the page loads. It's built from Guides, inline SVG, links and your theme's tokens, with CSS only for the motion. The awards and programmes are made up for the example: point each link at the story, the jury's note or the programme's page.
FAQ
How does the dimming work without script?
The list is a group, and each cell's link reads :has() on it: while any link inside the list is hovered or focused, the others take a solid tint, and the one that is hovered or focused takes the card tone and a ring on top of that. It is a plain colour change, so nothing flickers and nothing is mounted or unmounted. The tint is a solid mix of your muted and background tokens rather than a reduced opacity, which keeps the text of the settled cells at full contrast.
What happens on touch screens and with a keyboard?
Dimming only applies to a fine pointer (a mouse or trackpad), so on a phone every cell stays as it is. Keyboard focus lifts the focused cell the same way hover does, with a stronger ring, and the other cells settle too. Every cell is a real link, so Tab reaches each one in reading order.
What moves, and what happens with reduced motion?
The first row fades up once on load, one cell after the next, and the medal grows slightly when its cell is hovered. The colour changes ease over 200 milliseconds. With reduced motion the entrance, the growth and the easing are all off: the cell changes colour instantly and nothing moves.
How do I change the awards?
Edit AWARDS at the top of the file: a title, the programme, a fixed year and a mark. medalWith takes a motif for the medal's face (a star, a plus, a chevron, a dot, bars or a diamond are in the file); add your own as a list of path strings. Six cells fill the grid at every width (three across, then two); for another count keep it a multiple of two and three, or the last row will leave a gap.
Are these real awards?
No. Nimbusworth, Anvilmere, Elderbank, Foxlowe, Hartsedge and Ivywell are made-up programmes and Courseline a made-up kit. The medals are drawn by the block. If you show a real award, use its name in text and its official badge only where its rules allow it.
How does it fit on a phone?
Two columns of three rows, with the medal, the title and the foot of each cell stacked, and nothing scrolls sideways at 320 pixels. The header stacks with the tally under the sentence. In a right-to-left layout the order mirrors and the arrow flips to point up and to the start.
Related
- Pro
Grid Awards
Cards and gridsFour awards for a mortgage app in a 2 by 2 grid on shared hairlines, each tile with its own drawn trophy, the award, the programme and the year.
- 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.
- Pro
Asymmetric Mosaic Awards
Cards and gridsSeven awards for a type marketplace on a 4-column hairline grid with different spans: a 2 by 2 lead with a large drawn trophy, two 2 by 1 runners-up and four small cells.
- 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
Press to Flip Award Cards
Reveal and browseSix award cards in a hairline grid that are each a button flipping on press or Enter, from a drawn mark and the award to the entries it was selected from and its judging criteria.
- Pro
Spotlight Dialog Awards
Reveal and browseA 3 by 2 grid of award tiles that each open one centred dialog with the full details, a counter and Previous and Next, with arrow keys cycling.