Bar list

A React component in Beamline's Dashboard category.

Ranked horizontal bars, label and value over a meter, one line per row when there is room — top pages, sources, customers.

Use it for

  • Ranking up to ~10 items by one measure.

Not for

Anatomy

  • root (a size container) holding one grid of rows that share columns (subgrid), so values and shares line up
  • value label and Share (column headings, on the same columns)
  • row: identity (icon, label truncated with its full text as title, a where-it-leads arrow that arrives on hover for interactive rows), value, share, over a 6 px meter bar; wide, all on one line

Variants

  • tone: accent, neutral
  • sort: desc, asc, none

States

  • interactive (link/button rows: hover tint, press, a where-it-leads arrow on hover)
  • hovered row: the other bars step back to 45 % at once, return over --pui-motion-out
  • unmeasured row (full hatched bar, “Not measured” in ink-3 where the value goes)
  • empty
  • loading (`loading`: `limit` rows, or 5, drawn to the real rows' shape under the real header, so the list keeps its height when the items arrive)

Keyboard

  • Rows are links or buttons when href/onSelect is set.

Motion

Bars grow from zero once (duration-considered, stagger-item per row) and glide to a new width; CSS on foundation tokens, so the scope speed and reduced motion reach it. When the value changes, the change itself stays in view for a moment (_shared/delta-ghost): what was lost sits as a pale ghost under the fill, holds about 0.7 s and drains toward the new end; what was gained arrives lit and cools over about 1.3 s. A row whose rank changes slides to its new place, rows a longer limit shows grow in, rows a shorter limit hides fade where they stood (useFlip). Reduced motion: the ghost is shown still for 1.1 s, then removed; rows take their places at once.

Props

PropTypeDefaultDescription
items (required){ label, value|null, icon?, href? }[]—Items rendered in the component. Required.
format(v) => string—Formats a raw numeric value for display. Defaults to US number formatting.
shareboolean—Show each value's share of the total next to it.
limitnumber—Collapse after this many rows with a "Show all" toggle handled by the parent via `limit`.
onSelect(item) => void—Called when an item is activated; no handler by default.
style / refCSSProperties / native Ref—style: Inline styles on the documented visual root; no inline overrides by default. ref: Receives the documented root element; no ref by default.
classNamesBarListClassNames—Classes for the named visual parts; no part overrides by default.
loadingbooleanfalseWhile the items load: rows drawn to the real rows' shape (`limit` of them, or 5), so the list keeps its height.
sort"asc" | "desc" | "none"—Sort direction for the ranked values. Defaults to "desc".
valueLabelstring—Heading for the values column; omitted by default to show no column heading.
tone"accent" | "neutral"—Semantic colour of the displayed content. Defaults to "accent".
classNamestring—Classes on the documented visual root; no override by default.
styleCSSProperties—Inline styles on the documented visual root; no inline overrides by default.
refRef<HTMLDivElement>—Receives the documented root element; no ref by default.

Built from

Used in

Dependencies

motion

Import

import { BarList } from "@beamline/bar-list";

Get it

Bar list is part of Beamline UI. Install the parts you need in your React app as compiled packages or editable source. Get Beamline · Connect your agent

More in Dashboard

  • Explainable total: A total that answers "why this much?" in place: it unfolds into the steps that made it — a waterfall whose bars start where the last step ended, each…
  • Explainable change: A metric whose change explains itself: at rest the value, the change against a named period and a thin ribbon of its causes under the change; opened in…
  • Budget vessels: Budgets as glasses of money: the liquid is what is left (free money on top, committed money as a lighter layer under it), the lip at the period's budget…
  • Insight cards: Findings from an agent, one per page: the sentence, the series it is about with their change, a chart to scrub that names each point, and a follow-up…
  • Tracker: A row of status blocks for uptime, job runs or daily checks, with tooltips and a legend.
  • Metric card: A KPI that fills its tile: label, a value that rolls to each new number, the change with arrow, sign and tone, what it compares with and the value it…
  • Category bar: One bar split into labelled ranges with an optional marker that names its range.
  • App shell: The frame for every app screen: collapsible sidebar with grouped navigation, top bar and page.

Guides: Build an analytics dashboard in React

Part of Beamline UI: polished, editable React components and complete screens for custom applications. Build your own style from any look; tokens, fonts, radii, motion; not only colours.