Skip to content
shadcn.io

shadcn.io is not affiliated with official shadcn/ui

Grid Awards Block for React

Four 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.

Framework
UI library

Preview

Preview width

Installation

Part of Pro
Pro unlocks the code and one-line install of every Pro button and text effect, plus the MCP for your AI editor.
Have Pro already? Sign in to open it.Opens here as soon as you're Pro.

Overview

A grid of four awards for React with Base UI. A centred header counts the awards and the programmes that gave them ("4 awards from 4 programmes"), and under it a 2 by 2 grid of tiles shares its hairlines, inset from the page's rails and held by one rounded outline. Each tile draws its own trophy in SVG, in your theme's foreground: a cup, a shield with a check, a star on a plinth and an obelisk. Under the drawing the award is a heading, the programme sits below it and the year in the tile's corner. The grid stays two across at every width, with the drawings a size smaller on a phone. It's built from Guides, inline SVG and your theme's tokens, with a CSS transition for the entrance. The awards and programmes are made up for the example: replace them with your own.

FAQ

How do I change the awards?

Edit AWARDS at the top of the file. Each award has a title, its programme, a fixed year (an award given in 2024 stays 2024) and a mark. The header's tally is counted from the list, so adding or removing a tile keeps it true. Four tiles fill the 2 by 2 grid; for six, add a row: the grid is two columns wide at every size.

How do I draw a different trophy?

A Mark is a list of closed outlines that carry a faint solid fill (fills) and a list of plain strokes drawn over them (lines), all in a 64 by 64 box. The strokes keep a constant width at any size, and the fill is opaque so overlapping parts hide each other's outlines. Swap the path strings, or add a mark of your own, and give the tile that mark. Size comes from the class you pass to Drawn.

Are these real awards?

No. Zincthwaite, Cressmere, Beckleigh and Dovecrest are made-up programmes and Embury a made-up app. The trophies are drawn by the block, not copied from an award body. If you show a real award, name it in text, and use its official badge only where its rules allow it.

How do screen readers read a tile?

The awards are a list named Awards. Each tile gives the award as a heading, then the programme, then the year. The trophies are drawings hidden from assistive technology, so nothing depends on them, and each year sits in a bdi element so it keeps its place in a right-to-left layout.

How does it fit on a phone?

The grid stays two across: the drawings step down from 112 to 64 pixels, the type a size smaller, and the grid's inset from the rails narrows. Titles and programmes wrap inside their tiles and nothing scrolls sideways at 320 pixels.

What moves?

The header and the grid fade up once when the page loads, with a CSS transition. With reduced motion the transition is off and the block simply appears.

  • Pro

    Animated Grid Awards

    Cards and grids

    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.

  • Pro

    Category Grid Awards

    Cards and grids

    Sixteen 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

    Dense Badge Wall Awards

    Badges and seals

    A 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

    Laurel Display Awards

    Badges and seals

    A band of five awards for a weather app, each a laurel wreath drawn in SVG around the award's title and year, with the programme, category and issuer in text and the lead award larger in the middle.

  • Pro

    Seven 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

    Bento Awards

    Cards and grids

    The evidence behind one award in five cells set apart: the grand prize with a drawn seal, a counting figure, a jury quote, a score with a bar and a small laurel.