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.

API reference

Generated from the types. Every part also takes className.

BarList

itemsrequired
BarListItem[]The rows, in the order to show them: largest first for a ranking.
max
numberShow this many rows, then "N more". All of them when left out.
locale
stringFormats the values (a BCP 47 tag such as "zh-TW"): "412,345".
format
Intl.NumberFormatOptionsHow to write the values, e.g. { notation: "compact" } (412K).
labelrequired
stringNames the list for screen readers, e.g. "Items by class". Show the same words as the title of the card around it.
linkAs
ElementType = "a"Your router's link (e.g. next/link), for rows with href.
labels
Partial<BarListLabels>The words it says, to translate them.