shadcn.io is not affiliated with official shadcn/ui
Trend Arrows Awards Block for React
A ruled table for an investing app comparing five award measures this year and last year, with the change as an arrow icon and words (up 4, flat, down 1) so a change is never told by colour alone.
Installation
Overview
A year-on-year measures table for React with Base UI. Five rows (awards won, shortlists, categories won, programmes and win rate) sit under a ruled head with this year's figure, last year's and the change, each change an arrow icon and words in a small outlined chip: up 4, flat, down 1, up 19 points. A sentence in the header is counted from the same list. On a phone last year's column drops and the change stays. The page's rails and top rule come from the Guides spine, and the rows end the block. It's built from Guides, a native table and Lucide icons. The programmes and results are made up for the example.
FAQ
Where do the figures come from?
From ENTRIES at the top of the file: each entry has a programme, a category, a fixed year and a result, won or shortlisted. Every measure is a small function that counts one year of that list, so adding an entry changes the table and the header sentence together. The two years shown are the latest in the list and the one before it.
How is the win rate worked out?
Awards won divided by every place in a shortlist, wins included, rounded to a whole percent. A change in the rate is written in points ("up 19 points"), not as a percentage of a percentage. Shortlists are the places that did not win.
How does the table avoid colour?
The change is three things at once: an arrow, a word and the size, and the chip's outline is solid for up, lighter for down and dashed for flat. Nothing is green or red. The arrows point up and down, so a right-to-left page does not mirror them.
How do I add a measure?
Add an entry to MEASURES with a title, a note, a function that returns the figure for a year, and how to write it. Use unit for a word that follows the change, as the win rate does with points.
Related
- Pro
Edition Comparison Awards
Lists and tablesA table by category for a usage-billing API comparing its placement at two editions of an awards programme, each row reading 7th to 3rd with an arrow, the places gained in words, a filled dot on a win and a total row.
- Pro
Count By Year Awards
Charts and figuresA split for a flood-risk analytics tool: a header and a toggle at the start and, at the end, a ruled list of years from 2019 to 2025, each a horizontal bar and its count, counting either awards or programmes.
- Pro
Growth Staircase Awards
Charts and figuresA reverse split for a garden-centre till system: a framed staircase chart of the running total of awards by year with the three biggest years marked, beside the header and a list of three facts.
- Pro
Year In Review Awards
Charts and figuresA recap of 2025 for a podcast app: a 2025 compared with 2024 description list of four figures with their change in words, a ranked list of the top three awards with drawn seals and three dated milestones.
- Pro
Sortable Table Awards
Lists and tablesA sortable table of awards with buttons in the column heads, aria-sort, status badges with an icon and a word, a sticky first column and a count in the foot.
- Pro
Period Comparison Table Stats
ComparisonsA five-row month-on-month report with this period, the period before, and a bar for the size of each change.