Bar
Compare magnitudes across categories with vertical or horizontal bars.
A ranked list where each row's value shows as a quiet bar behind its label.
A ranked list: each row is a label and its value, with a quiet bar behind the label sized against the largest value. Top rows first, Show all for the rest. Put it in a Section or Card.
Top pages by views, five rows first, each row a link.
One measure, one colour. Values show as text on every row, so the bar only has to show the shape of the ranking. Several series or an axis stay BarChart; usage against a limit stays UsageList.
A ranked list: each row shows a label and its value, with a quiet horizontal bar behind the label sized against the largest value or the total. Rows can add an icon, a meta line and the change from last period. Top rows first, with Show all for the rest.
import { BarList } from "agentic-ds-kit";From contracts/barlist.json: must is the a11y requirements, defaults the prop defaults, stops if the doNot rules where the agent asks instead of inventing a cousin.
| Name | Type | Required | Default | Notes |
|---|---|---|---|---|
| data | array | Yes | — | One row per item, in any order: sort decides the order shown. An empty array shows a small kit Empty, No data. |
| sort | descending | ascending | none | No | descending | descending puts the largest first; none keeps the order of data. |
| scale | max | total | No | max | max sizes bars against the largest value. total sizes each bar as its share of the sum of all values and writes the share, like 33.0% of total, at the start of the meta line. |
| maxRows | number | No | — | Rows shown before Show all. Without it every row shows. Show all appears only when data has more rows than maxRows, and it turns into Show fewer once open. |
| valueFormatter | function | No | — | (value: number) => string for the value text, like a currency or a percent. Defaults to the chart format: 1,240, 12.4k, 1.2M. |
| label | string | No | Ranked list | Names the list for screen readers, like Top pages by views. The visible title comes from a parent Section or Card. |
Compare magnitudes across categories with vertical or horizontal bars.
A list of usage limits, one a row: the limit's name, how much is used of it, a bar, and a short note.
Part-to-whole share for a handful of segments, as a donut or solid pie.
A list of records, one row each: primary and optional secondary line, leading avatar or icon, trailing value, badge, actions, or chevron.