Dashboard Grid
DashboardGrid: a row of stats over a container-query grid of cards (one column, two from 42rem, `columns` from 64rem) where rows are at least one height and cards in a row share it, so they line up, keep their size from loading to loaded and grow their row rather than clip. DashboardCard spans columns and rows and loads through DataState (a skeleton, the error with Retry, an empty title); DashboardChart fills a card and is named by its title; DashboardMeter centres a ring meter in one; DashboardStats and DashboardStat (with a StatDelta in `delta`, and `icon` with `tone` for a KPI chip) draw placeholders of the value's height.
Example
- Runs261up 12% vs. last week
- Pass rate94.2%Target 95%
- Median latency126 msdown 5% vs. last week
- Spend$182.40
Evaluation runs
GPU quota
72 of 100 GPU hours
Storage
1.86 of 2 TB
Experiments
- Shorter system promptRunningexp-14
- Retrieval with rerankingWonexp-13
- Temperature 0.2Lostexp-12
Latency
Installation
Usage
A home or metrics screen: a row of DashboardStats (icon and tone give a stat its chip) over DashboardCards that load through status and data, with charts and meters inside.
API reference
DashboardGrid
| Prop | Type | Default |
|---|---|---|
statsA `DashboardStats` row above the cards. | ReactNode | – |
columnsColumns on a wide container (64rem and up). From 42rem the grid has two; below, one. | 2 | 3 | 4 | 3 |
labelsLabels every card shares; a card's own `labels` win. | Partial<DashboardLabels> | – |
headingLevelThe level of the cards' titles. Default 2. | 2 | 3 | 4 | 2 |
Also takes <div> attributes.
DashboardStats
| Prop | Type | Default |
|---|---|---|
aria-labelrequired | string | – |
loadingMarks the row busy while its figures load; `DashboardStat loading` draws each placeholder. | boolean | false |
Also takes StatGroup.
DashboardStat
Takes Omit<ComponentProps<typeof Stat>, "children"> &.
DashboardCard
Takes DashboardCardBase &.
DashboardChart
| Prop | Type | Default |
|---|---|---|
configrequired | ChartConfig | – |
childrenrequired | ReactNode | – |
aria-labelNames the chart when the card's title doesn't. | string | – |
Also takes <figure> attributes except children, aria-label, aria-labelledby.
DashboardMeter
| Prop | Type | Default |
|---|---|---|
labelrequired | ReactNode | – |
size`lg` (default) fills a card; `md` or `sm` beside other content. | MeterRingSize | "lg" |
hintA line under the label, like "28 of 40 hours". | ReactNode | – |
childrenReplaces the value in the ring's centre. | ReactNode | – |
Also takes MeterProps except variant, children.
Other exports
dashboardLabelstype DashboardCardPropstype DashboardChartPropstype DashboardGridPropstype DashboardLabelstype DashboardMeterPropstype DashboardStatPropstype DashboardStatsPropsAccessibility
- Each card is a region named by its title; a DashboardChart inside is named by the same title, and a DashboardMeter keeps role=meter with its label.
- Cards in a row share its height, at least --dashboard-row-height, so a card keeps its size from loading to loaded and grows its row rather than clip.
- A failed card announces its error once, as an alert, with a Retry button.
Agent actions
Agents press the cards' own buttons (Retry, your actions) by name; charts expose their data through ChartDataTable.
Runs agent.snapshot() from @ui-sdk/react/agent on the live preview above.