MetricGrid
Responsive grid of MetricCards, typically the summary strip at the top of a dashboard. Auto-fits by default.
Props
MetricGrid extends HTMLAttributes<HTMLDivElement>.
| Prop | Type | Default | Description |
|---|---|---|---|
metrics | MetricDatum[] | — | Array of metric data objects. |
columns | number | — | Fixed column count. Omit to auto-fit. |
minColumnWidth | number | 150 | Minimum tile width when auto-fitting. |
variant | "bordered" | "plain" | — | Forwarded to each MetricCard. |
connected | boolean | — | Removes gaps and adds borders between metrics. |
Examples
Grid of 4 metrics
Connected dashboard header strip
import { MetricGrid } from "@solarius/onset";
import type { MetricDatum, MetricGridProps } from "@solarius/onset";