Statistics with context
Numbers on one side, the argument they support on the other.
Live preview
Source
This exact file renders the preview above.
components/blocks/sections/stats/with-context.tsx
components/ui/metric.tsx
Demo source — adapt to your project. Foundry is not published as a package.
Usage
Figures without a claim are trivia; a claim without figures is marketing. This layout insists on both, and names where the numbers came from.
- Say how the figures were measured. An unattributed number is worth less than none.
- Use invertTrend where a decrease is the good outcome.
Variants and states
Every entry below is a genuine difference in behaviour or layout, and every one of them is visible in the preview above.
- Two-column layout
- Four metric tiles
- Provenance note
Accessibility
- Metric semantics
- Each tile is a description list pairing label and value.
- Direction
- Deltas carry an arrow, a sign and a colour, so direction survives greyscale.
Foundry implements published ARIA patterns and is tested against them. No WCAG certification is claimed — see the accessibility documentation for what is and is not covered.
Related
All sectionsBefore and after figures
The same four measures twice, with the change carried by arrow, sign and colour.
starter3 variantsMetric
A KPI tile with trend direction, invertible "good" semantics and a decorative sparkline.
starterFeatured4 variantsDivided statistics band
Four figures separated by rules rather than boxed in cards.
starter3 variants