StatGrid
ImplementedResponsive KPI grid composing StatCard molecules — 16px gap, equal columns, stacks to 1 column on mobile. Renders up to 4 cards by default; showAll lifts the cap, columns pins the layout.
components/organisms/StatGrid/StatGrid.tsxStatGrid component.
StatGrid
design-system
StatGrid component preview and API reference.
Props
StatGrid
statsStatConfig[]—Stat configs — { id: string; label: string; value: string | number; unit?: string; trend?: StatCardTrend; icon?: React.ReactNode; href?: string; labelClassName?: string; valueMuted?: boolean; hint?: string }. Renders the first 4 unless showAll is set.
ariaLabelstring"Key metrics"Accessible label for the grid region (role='region'). English default "Key metrics" — French consumers should pass a localized string (e.g. "Indicateurs clés").
columns1 | 2 | 3 | 4 | 6(derived)Explicit column count (§126 Wave 3 gap-1). Default derived from rendered count: 1→1, 2→2, 3→3, 4→4, 5-6→3 (two balanced rows), 7+→4. Derived layouts stay responsive (stack on mobile).
showAllbooleanfalseRender ALL stats instead of capping at 4 (§126 Wave 3 gap-1 — the StatisticsEventDetail 6-card grid dropped comps/refunds/epFees cards under the legacy cap).
<StatGrid />Accessibility
Type
1 ruleARIA
1 ruleUsage
Import
import { StatGrid } from "@epasslive/design-system"Example 1
<StatGrid stats={kpis} ariaLabel="Key metrics" />Example 2
<StatGrid stats={eventStats} showAll columns={6} ariaLabel="Indicateurs clés" />Anti-patterns
— Do not fetch data directly in organisms
— Avoid tight coupling to specific data sources