Skip to content
shadcn.io

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.

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

Is the table accessible?

Yes. It has a caption for screen readers, a header row with column scope, the department as a row header and the foot row as a real table footer. The bars are hidden from assistive technology: the rate is in the cell as text.

Are these departments and figures real?

No. Orbitwell, the Quincewood Standard and all of the figures are invented. Replace them with your own headcount and awards.

  • Pro

    Team Achievement Awards

    People and teams

    Three 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 teams

    Three 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 figures

    Nine 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 tables

    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.

  • Pro

    Medal Count Awards

    Rankings and scores

    An 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

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