# BarList: a ranking you read from the top

BarList ranks names by one value, such as the busiest lanes or the clients who owe the most, with a bar behind each name as long as its value and the number at the right edge in tabular figures. The bars stay neutral or take the one data colour, because the length already says how much, and each row can open the records it counts.

Checked 2 December 2026. By Bohuslav Poláček. https://meadowstack.com/components/bar-list/

*Two rankings from the demo on Wednesday 2 December 2026: Ridgeway Freight's busiest lanes over the last seven days with their roads, and the clients who owe Kestrel the most, with the overdue part or the number of open invoices.*

A live screen, rendered from the kit's components on the page: https://meadowstack.com/components/bar-list/

## What it is for, and what the preview shows

A list someone reads from the top: the busiest lanes, the clients who owe the most, the products that sell. The preview holds two rankings from the demo, rebuilt from the kit with its records. On the left, [Ridgeway Freight](https://meadowstack.com/examples/haulage-dispatch-planning/)'s busiest lanes over the last seven days, from Daventry to London with 68 shipments down to Dover to Ghent with 27, each with its roads beside the name. On the right, the clients who owe [Kestrel Accounting](https://meadowstack.com/examples/accounting-office-documents/) the most, The Rudder Inn first with part of its balance overdue, the others with their number of open invoices.

The bars are neutral on the left and in the one data colour on the right, as the demo draws them. Each value stands outside the bar's track at the right edge, so a long name is cut short before it reaches a number. In the demo every row opens the list behind it: the shipments on that lane, the client's record.

## The rules, and where they live

- **The manifest**: use it for a ranking with values, such as top customers or top products; not for a time series (`ColumnChart`). It replaces "a table with hand-drawn bars".
- **docs/principles.md, Tables**: a ranking people read row by row with more than one figure, such as courts by occupancy, is a `DataTable` in a `Section` beside the charts, not hued bars in a card.
- **docs/patterns.md, Data**: a ranked list is the `BarList`, as in Ridgeway's reports; a mark opens the list behind it, a ranking row through its `href`, as in Kestrel's invoicing overview.
- **AGENTS.md, Look and feel**: colour carries information only: a status, an identity or a data series, always next to a word or a legend.
- **docs/principles.md, Charts**: every chart has a table for screen readers.

## What AI coding tools write instead

A table with hand-drawn bars, as the manifest's `replaces` names it. What goes wrong:

- Each bar gets a colour of its own, or a colour by its value, which repeats what the length already says and hints at a meaning that is not there. The kit's bars are neutral, or all in the one data colour, and a hue goes only to an identity, as a dot beside the name and a light wash of its bar.
- The number sits on the end of the bar, where it collides with short bars and long names. The kit puts every value outside the bar's track, right-aligned in tabular figures, so the numbers read straight down.
- The bars are scaled to the page's width or to a round number. The kit scales them to the largest value in the list.
- The rows are boxes of text that a screen reader cannot read as a ranking. The kit's rows are an ordered list with a table of every name and value for screen readers, and a row that leads somewhere is the app's own link.

## How to use it

- `items`: `key`, `label`, `value`, an optional `hint` beside the name, `href` for the list behind the row and `hue` for an identity such as a court or a person.
- `bars`: `identity` washes a row's bar in its hue; `data` draws every bar in the one data colour and leaves the identity to the dot.
- `renderLink` wraps a row that has an `href` in the app's router link; without it the row stays plain. `formatValue` formats the numbers.
- `title` and `description`; `titleHidden` keeps the title for screen readers when a section heading above already names the list.

## Its entry in the manifest

*The component's rules as the kit's manifest states them, the same entry an AI coding tool reads.*

| Manifest field | BarList |
| --- | --- |
| What it is | A ranked list of names with a bar behind each value. |
| Use it for | A ranking with values: top customers, top products. |
| Not for | For a time series (ColumnChart) |
| It replaces | A table with hand-drawn bars |
| Screen types | Overview; Record |
| Import | `import { BarList } from "@meadowstack-studio/kit";` |

Read from the kit's component manifest when the site was built (126 components, packages/kit/src/components.json); the same entry answers an AI coding tool through the kit's MCP server.

## Where it runs in the example apps

*The example apps whose code renders a BarList, and the modules it sits in.*

| Example app | Modules that render it |
| --- | --- |
| [An app for a packaging and print company](https://meadowstack.com/examples/packaging-print-production/) | Quotes |
| [An app for a studio or agency](https://meadowstack.com/examples/agency-capacity-planning/) | Finance |
| [An app for a haulage company](https://meadowstack.com/examples/haulage-dispatch-planning/) | Costs, Reports |
| [An app for an accounting office](https://meadowstack.com/examples/accounting-office-documents/) | Invoicing |
| [An app for one person](https://meadowstack.com/examples/personal-app-for-a-creator/) | Content, Money |

Read from the demo's source when the site was built: 5 of 9 example apps render <BarList>, in the modules named here as each app's sidebar names them.

## How the demo calls it

*Kestrel's overview: one row per client with money open, the overdue part or the number of open invoices as the hint, every bar in the data colour, the title left to screen readers under the section's heading, and each row a link to the client.*

From `apps/demo/src/modules/invoicing/pages/overview.tsx` in the Meadowstack repository:

```tsx
{debtors.length ? (
  <BarList
    bars="data"
    className="pt-2"
    title={tx("Nejvíc dluží", "Who owes the most")}
    titleHidden
    items={debtors.map((debtor) => ({
      key: debtor.id,
      label: debtor.name,
      value: debtor.open,
      hint: debtor.overdue
        ? tx(`${formatMoney(debtor.overdue)} po splatnosti`, `${formatMoney(debtor.overdue)} overdue`)
        : invoicesLabel(debtor.count),
      href: invoicingPath(`/klienti/${debtor.id}`),
    }))}
    formatValue={(value) => formatMoney(value)}
    renderLink={barLink}
```

## Questions

### When is a bar list better than a table?

When the list ranks names by one value. A ranking people read row by row with more than one figure is a data table in a section beside the charts, as the kit's principles say.

### Can a row open the records behind it?

Yes. Give the item an href and pass renderLink, which wraps the row in the app's router link; only rows that lead somewhere react to the pointer. In the demo a lane opens its shipments and a client opens its record.

### Why is every bar the same colour?

The rows are one series, named by the title, and the length already says how much, so a colour per bar would only repeat it. A hue goes to an identity, such as a court or a person, as a dot beside the name and a light wash of its bar.

### Is it accessible?

The rows are an ordered list, a table of every name and value is there for screen readers, and a row with a link is the app's own link, reached with Tab. The values sit at the right edge in tabular figures, so they read straight down.

## Related

- [A fleet cost report that ranks every truck](https://meadowstack.com/screens/fleet-costs/) (Screens)
- [Heatmap: when the work happens, by weekday and hour](https://meadowstack.com/components/heatmap/) (Components)
- [StatGroup: the key figures at the top of an overview](https://meadowstack.com/components/stat-group/) (Components)
- [Closing the till at the end of a shift](https://meadowstack.com/screens/till-close/) (Screens)
- [The overview screen](https://meadowstack.com/patterns/overview/) (Patterns)
- [A change order that shows its price before anyone approves it](https://meadowstack.com/screens/change-order-form/) (Screens)
