Skip to content

StatList

Label and value pairs for a rail: posts, words, uptime, the last update.

In a SidebarCard in the rail. Numbers that belong in the text of a page go in the text.

<SidebarCard title="Stats">
<StatList items={[{ label: "Posts", value: 5 }, { label: "Uptime", value: "--", id: "uptime" }]} />
</SidebarCard>

A number gets thousands separators. An item’s id goes on its value, for a value a script keeps up to date.

One column: rows divided by soft hairlines, the label muted at the left and the value in ink at the right. Two or three columns: each value over its label, with span for a long value.

Prop Values
columns 1 (default), 2 or 3
tone cream (default) or dark

The list is a <dl>: each label is a term and each value its description, so a screen reader reads them in pairs.

StatList.astro. Ported from the handoff.

SidebarCard, MiniCalendar.