SummaryCard
Outside the canonA card in the summary row above an index page's list (2026-10-13, the Invoicing index pages): label, value, one line of detail, and a (?) after the label whose tooltip says which kind of number it is — a period ("Last 30 days"), a balance ("As of today") or something to fix ("All dates") — plus whatever the one line leaves out (2026-10-27, Danielle: one key fact per card; the scope had been a line at the foot). With onSelect it filters the list under it, Stripe's model: a control (its edge darkens to stone-500 on hover) that goes navy when chosen — ring-1 doubling the line, a navy/5 wash, a filter mark — and is a toggle button (aria-pressed). The list's filter pills are the state; the card is chosen when they match its filter, so removing the pill deselects it. Without onSelect it is reference, and can carry an action link instead. Either way it is a card: a stone-25 fill on a 1px stone-400 edge (DES2-11, 2026-10-23; it was white, on stone-300 with onSelect and stone-200 without). The rule it is built for: the number on a card equals the rows its filter shows.
App: Ui::SummaryCardComponent (suggested): a filtering card is a link carrying the list's GET params, chosen when the request's params match
A row that filters
#filteringThe Transactions summary's cards with onSelect: click one to choose it (navy), again to clear it. The all-clear card is reference, not a control.
Filtering: failed. Click a chosen card again to clear it; the all-clear card has nothing to filter, so it is not a control.
Reference, with a link
#referenceWithout onSelect: the same card, not a control, and an action link at the top right, "View →", where a filtering card shows its filter mark, for a card that sends you elsewhere rather than filtering (Payouts' Next payout and Pending balance). The link keeps a full accessible name (aria-label). The scope is behind the (?) here too.
Props
| Name | Type | Default | Notes |
|---|---|---|---|
| label | ReactNode | — | |
| value | ReactNode | — | |
| detail | ReactNode | — | One line under the value, 8px down, truncated from sm if it runs over (on a phone it may wrap): the card's one key fact, 14px stone, with its counts and amounts in SummaryFigure (2026-10-23, the Overview tile's anatomy; one line since 2026-10-27) |
| SummaryFigure | component | — | A count or an amount in a detail, medium stone-dark: "**39** transactions". Names, dates and thresholds stay plain |
| scope | string | — | "Last 30 days", "As of today", "All dates", then anything the one line leaves out ("Last 30 days · includes $4,320.00 pending ACH"). Shown in a Tooltip on a circle-question after the label, and as sr-only text in the card; a click on the mark does not toggle the filter (2026-10-27; it was a line at the foot) |
| tone | default | negative | positive | default | negative: red value and a red warning mark after the grey label (the label went grey 2026-10-27); positive: the all-clear ("All synced") |
| onSelect | () => void | — | Makes the card a toggle that filters the list |
| selected | boolean | false | Whether its filter is on |
| action | ReactNode | — | A link at the top right, in the label's row, for a card that sends you somewhere instead of filtering: a link-navy Button reading "View" with a trailing arrow, an aria-label naming where it goes, and -my-2 -ml-3 -mr-2.5 so the row keeps the label's height (2026-10-23; it was under the details) |
| compact | boolean | false | Label and figure only: 16px padding and the value at ui-2xl at every width, for figures inside a page's content column above a form (2026-11-10, Collect payments' customer page). Pass no detail or scope with it |