Bar list
Ranks named values with bars in proportion to the largest.
Preview
Local preview. It doesn't affect real accounts, environments, or run data.
Compare the same example at each size and density. Switching keeps input values and selection state. Size guidance and comparisons
Disk used by directory
Tokens this week by project
Sector return against the market, 20 days
Usage
Rank named values of one unit, such as disk by directory, tokens by project or calls by tool. Each row reads name, bar and value on one line, with an optional detail such as a path under the name. Bars are in proportion to the largest value, or to max when the values share a limit. Set maxRows to keep a long ranking inside a dashboard card. With diverging, signed values, such as each sector's gap against the market, grow from a center line on one scale: a rise toward the inline end in the trend's up color and a fall toward the start in its down color.
- Don't mix units in one list. Rank one measure, and put a second one in its own list or a Table.
- Don't use BarList for change over time. Use LineChart or Sparkline.
- Don't use BarList for one measurement against its limit. Use Meter.
Size: SizeProvider size="small" resizes the whole composition, including portals. The default size is Default. Size guidance and comparisons
Anatomy
div → ol(aria-label) → li: name + detail, bar (aria-hidden), value; with maxRows, ScrollArea(region) around the ol; with diverging, the bar is a DivergingBar track (aria-hidden)
Keyboard and accessibility
BarList is an ordered list of text: each row reads its name, its detail and its value. The bars are decoration. A list bounded by maxRows scrolls in a named region that takes focus, so arrow keys scroll it.
Give each control a name that describes its purpose. Connect error messages to their controls, and signal state with more than color. Automated checks don't replace manual keyboard and assistive technology testing.
Example code
Shared components take their styles from design tokens. Each example sets its own composition and accessibility attributes. The calling screen defines callbacks, refs, and product data.
Key API
The table lists the common wrapper's main props. See the package type declarations for the full types.