Metric
Outside the canonFrom the pattern backlog (workshop Metrics Grid), built for the Invoicing Overview and the Payout summary: label, value, detail line; a MetricGrid lays several out. No sparkline (charts are phase 2). A metric that summarises a list links to it (P6).
App: Ui::MetricComponent (suggested; outside the canon vocabulary)
Metrics grid
#gridFive quiet cards, the Overview's 'Last 30 days' row. Each links to the list it summarises.
- Last payment
- $1,282.50
- Hillside Food Co-op · Feb 10 at 4:00am
Overview tiles: size lg, an 8px gap, a fact or a note
#overview-tilesThe Overview's four top numbers (DES2-12): size="lg" puts the value at ui-4xl (40px on 44px) and detail_gap="md" puts the first line 8px under it. The line is a fact (14px stone, its number medium stone-dark) or a note (12px stone-light), passed in the detail. Tiles are stone-25 on stone-400, 24px padding, 24px apart.
- Owed to you
- $66,920
- 33 unpaid invoices
- Overdue
- $52,115
- 27 invoices past due
- Next payout
- Feb 17
- Amount hidden
- Next payout
- —
- None scheduled
Inside a featured card
#summaryThe Payout summary: four metrics under the headline amount.
$12,419.02
- 22 Payments
- $13,050.00
- 4 Refunds
- ($420.00)
- Fees
- ($210.98)
- Net Amount
- $12,419.02
Props
| Name | Type | Default | Notes |
|---|---|---|---|
| label | ReactNode | — | |
| value | ReactNode | — | |
| detail | ReactNode | — | Line under the value |
| tone | default | negative | positive | default | negative: the value in red and a red warning mark after the label, which stays stone-light like every other label (2026-10-27; it had turned red too) |
| href | string | — | Wraps the metric in a link that fills its cell; a ↗ appears in the corner on hover and focus |
| size | md | lg | md | The value at ui-2xl (24px), or ui-4xl (40px on 44px) for the Overview's four top numbers and nothing else (DES2-12); lg is ui-3xl below xl (1280): from 1024 four tiles beside the icon rail leave a number about 157px, and below 1024, two and one to a row, 40px read as too big for the tile (2026-10-27; it went back up to 40 there) |
| hover_wash | boolean | true | With href, a surface-muted wash over the cell on hover. Off for the Overview's Period overview figures, whose cells are padded at the sides only; the ↗ still marks the link |
| detail_gap | sm | md | sm | Space between the value and the detail: 4px, or 8px on the Overview (DES2-12), where the lines under a number are a fact (14px stone, its number medium) or a note (12px stone-light) |
| MetricGrid.columns | 2 | 3 | 4 | 5 | 4 | |
| MetricGrid.phone_columns | 1 | 2 | 1 | Two columns on a phone for short figures (2026-10-15): a payout's four amounts one per row took a 390px screen |