Skip to content
Design System
GitHub

A short ranked list of counts with no chart library: each row a label, a value and a --chart-1 bar scaled to the largest, with optional links and "N more" and no surface of its own.

In card

Install
npx shadcn add @syncrobotic/bar-list

Also installs: @syncrobotic/cn, @syncrobotic/empty-state, @syncrobotic/format-number

Overview

When to use

  • "Items by class" or "files by format" on a dataset's card, the top 5 to 10.
  • Several small rankings on one data page, each inside its own card.
  • The top classes of a row, inside a table cell.
  • Rows that lead to the list filtered to them, with href.

Use something else

  • A level against a known range (storage, a quota): Meter.
  • How a whole splits into a few parts: Share bar.
  • A ranked chart people explore, with axes and a table view: Chart (the bar-chart-ranked pattern).

Which one: MetricCard, Meter, ShareBar, BarList or Chart

More examples

States and real uses. Each example is also a Storybook story and a visual regression test.

Compact

In table

Zh tw

Empty

Usage rules

  • For items per class, files per format, the top 5 to 10. Pass the rows in the order to show them, largest first; max shows that many, then says how many more.
  • One series: every bar is --chart-1, scaled to the largest value. No status colours, no colour per row; a row that needs attention says so in words elsewhere.
  • The value is written in each row (tabular, with locale; format to shorten it), so it needs no Chart / Table switch, as a sparkline does.
  • No surface of its own: put it in a Card (with CardDataHeader naming it), a table cell or a sheet. label names the list for screen readers; show the same words as the card's title.
  • Give a row href when it leads to a view of that item (the list filtered to it): the whole row is the link, 36 px tall (44 on touch). Pass linkAs for your router.
  • A level against a known range (storage, a quota) is a Meter; values over time or a chart people explore is chart (bar-chart-ranked).

Changelog

  • 0.64.02026-12-01Formatted with Prettier (class order sorted); the code is unchanged.
  • 0.58.02026-11-28Stable: shipped ten releases with no breaking change, with unit tests, measured accessibility (components) and use/instead docs. Its API now changes only after a release deprecates what goes, with a migration line.
  • 0.53.02026-11-27Its doc opens with its description, word for word; the code is unchanged.

How to upgrade