Skip to content
shadcn.io

shadcn.io is not affiliated with official shadcn/ui

Accordion Awards Block for React

Six awards as full-width bands that open one by one, each revealing a drawn mark, the facts behind the award and the jury's citation.

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

An accordion of awards for React with Base UI. Under a compact header that counts the awards ("6 awards since 2021"), six full-width bands run rail to rail on hairlines and end the block. Each band's trigger reads the year in tabular figures, the award and the programme that gave it, with a plus that turns into a minus as the band opens. The open panel adds a drawn mark in your theme's foreground and the facts behind the award (category, criteria, entries judged and prize) with the jury's one-sentence citation. The first band is open on load and any number may be open at once. On a phone the year drops under the award and each fact puts its label above its value. It's built from the catalog Accordion, Data List and Guides. The awards and programmes are made up for the example: swap AWARDS for your own, and use only recognition you have actually received.

FAQ

How do I change the awards?

Edit AWARDS at the top of the file. Each award has a title, a programme, a fixed year, a category, the criteria it was judged on, how many entries the jury read, the prize, a one-sentence citation and a mark (crown, gem, medal, rosette, shield or star). The header's tally is counted from the list, so it always matches the bands. Add the id of a band to defaultValue to open it on load.

Can several bands be open at once?

Yes. The bands open independently, so a visitor can compare two awards side by side. Pass multiple to the Accordion; remove it for one band at a time.

How does it work with a keyboard?

Each trigger is a button: Enter or Space opens and closes its band, and the focus ring sits inside the band so it is never clipped. Every trigger is its own tab stop: Base UI and React Aria don't move between triggers with the arrow keys.

Is the text of a closed band in the page?

Yes: closed panels stay in the page, hidden until found, so the browser's find-in-page can open one.

Are these real awards?

No. Cedarline is a made-up app and Cobaltfield, Dunsterling, Fernhallow, Caldwenny, Ironwhistle and Linnetcroft are made-up programmes, and the citations are written for the example. The marks are drawn by the block, not copied from any award body.

How does it fit on a phone?

The year moves under the award, the programme sits beside it and each fact in an open band stacks its label above its value, so nothing scrolls sideways at 320 pixels. The drawn mark stays beside the facts at a smaller size. In a right-to-left layout the bands, the plus and the order of the columns mirror, while years and counts keep their digits in order.

  • Pro

    Collapsible List Awards

    Lists and tables

    Twelve awards in five collapsible category groups with counts, any number open at once, and an Expand all button beside the header.

  • Pro

    Peek Drawer Awards

    Lists and tables

    Five awards as ruled rows that show a clamped, faded peek of the jury's citation and open an inset drawer of facts, one at a time.

  • Pro

    Details Awards

    Cards and grids

    Three award data sheets for a monitoring tool: a drawn mark and the award's name over a description list of result, programme, category, entries judged, announcement date and prize.

  • Pro

    Sheet Detail Awards

    Lists and tables

    A table of six awards whose names open a side sheet with a drawn seal, how the award was judged, its facts and Previous and Next buttons.

  • Pro

    A vertical rail of awards by year for a planning tool, a node for each year on a solid hairline with its awards as rows, and the older years behind a View earlier years Collapsible.

  • Pro

    Accordion FAQ

    Accordion lists

    A side-header FAQ for a web analytics tool: the title, one sentence and a contact prompt beside seven questions in an accordion, behind a split divider.