shadcn.io is not affiliated with official shadcn/ui
Department Rate Table Awards Block for React
A ruled table of eight departments with their headcount, awards won and awards per ten people, drawn as a bar beside the number, sorted from the highest rate down with a foot row for the whole company.
Installation
Overview
A department table for React with Base UI. A start-aligned header sits over one ruled table of eight departments: the headcount, the awards their people won in 2025 and the awards per ten people, worked out from those two figures and drawn as a bar beside the number. Rows run from the highest rate down with ties broken A to Z, and the rate column is marked as sorted descending. A foot row gives the whole company. The standard counts per head, so a small department counts as much as a large one. The bars are drawings and every figure is in text. On a phone the bars drop out and the table keeps four short columns. The page's rails and top rule come from the Guides spine. It's built from Guides, a native table and CSS. The standard, the departments and the figures are made up for the example.
FAQ
How do I change the departments?
Edit DEPARTMENTS at the top of the file: a name, the number of people and the awards won. The rate per ten people, the order of the rows, the bar lengths, the totals in the foot row and the sentence in the header are all worked out from that list.
How is the rate worked out?
Awards divided by people, times ten, rounded to one decimal. Rows are ordered by the exact ratio, not the rounded one, so two departments that show the same rate are tied for real, and a tie goes A to Z. The foot row uses the company totals, not an average of the rows.
Can I sort the table by another column?
Not as shipped: the table is fixed at the rate order the standard publishes, and its column header says so with aria-sort. If you need sorting, make the headers buttons and sort the rows with a comparison like byRate; the rest of the block does not depend on the order.
What changes on a phone?
The bar column drops out and the number stays, so four short columns fit without scrolling. The table sits in a focusable region, so a keyboard can scroll it if a long department name ever pushes it wider.
Related
- Pro
Team Achievement Awards
People and teamsThree team award cells set apart with overshoot corners: the award, the team, a group of initials avatars with a count of the rest, one line on what the team did and the teams it shared the award with.
- Pro
Top Performer Awards
People and teamsThree award winners on shared hairlines, each with initials, a name, the award taken and two figures set against a team median, with the difference in words and a small bar.
- Pro
Category Counts Awards
Charts and figuresNine count tiles on shared hairlines for a sports-league manager: a drawn category glyph, the count in large type, its share of all awards and a bar scaled to the largest, with the largest outlined.
- Pro
Trend Arrows Awards
Lists and tablesA 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.
- Pro
Medal Count Awards
Rankings and scoresAn Olympic-style medals table for a league-tables service: seven product lines ranked by gold, then silver, with drawn medal heads, a total, a stated ranking rule and a top-line callout.
- Pro
Awards Table Team
RecognitionA table of eight awards for a field-notes app: the winner, the category with a small drawn mark, the company year, and a button that opens the citation in place under the row.