shadcn.io is not affiliated with official shadcn/ui
Distribution Bar Filter Awards Block for React
One 100% bar split by award category above eight count pills; pressing a pill emphasises its segments and filters the list below.
Installation
Overview
A distribution filter for React with Base UI. A centred header says how many awards there are and in how many categories. Under a ruled band with + marks, one bar of 100% is split into segments by category, the biggest first, each in its own foreground tone; below it eight pills carry each category's name, its count and a swatch in its segment's tone. Press a pill (any number can be on) and its segments turn solid while the others fade, and the list underneath narrows to those categories. A polite line reads "Showing 7 of 20 awards, 35% of the total" and a Clear button starts again. The list runs in three columns from lg and two from md, one row per award with the year, the award, its category and programme. The awards and programmes are made up for the example: replace them with the recognition your product has actually received.
FAQ
How do I change the awards or the categories?
Edit AWARDS and LABELS: each award has a title, a programme, a category key and a fixed year. The counts, the segment widths, the order of the pills and the percentages are all derived from that list.
Why do the percentages always add to 100?
The shares are worked out by largest remainder: each category gets its whole-percent floor, then the categories with the biggest fractions get the spare points. The line under the pills adds the shares of the pills you pressed.
What does a screen reader hear for the bar?
Nothing: the bar is a drawing, hidden from assistive technology. The pills are a group of toggle buttons with aria-pressed, each reads its name and "4 of 20 awards", and the status line gives the totals after every change.
Does the bar flip on a right-to-left page?
No. The bar keeps its left-to-right order so the segments, the pills and the percentages stay in step; the text around it follows the page's direction.
Related
- Pro
Filterable Award List
Filters and searchEighteen awards in two columns narrowed by category chips and a year group, with a live count, a Clear filters button and an empty state.
- Pro
Category Grid Awards
Cards and gridsSixteen 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
Status Radio Toggle Awards
Filters and searchA radio group styled as a pill switch with a sliding thumb filters awards by status, with an icon and a word on every row and a live count.
- Pro
Category Tabs Awards
Filters and searchUnderline tabs by award category, each with a count, over a two-column grid of awards with a drawn mark in a frame, beside a split divider.
- “Pro
Bento Awards
Cards and gridsThe 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.
- Pro
Donut Pill Legend Stats
Parts of a wholeA traffic-source donut over a row of pill toggles: switch a source off and its arc leaves the ring, the others grow to fill it, and the shares and the total in the middle are worked out again.