Skip to content
Eskais UI

Blocks

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

  • Runs
    261
    up 12% vs. last week
  • Pass rate
    94.2%
    Target 95%
  • Median latency
    126 ms
    down 5% vs. last week
  • Spend
    $182.40

Evaluation runs

Passed and failed, per day

GPU quota

This month
72%
Hours used

72 of 100 GPU hours

Storage

Datasets and checkpoints
93%
Space used

1.86 of 2 TB

Experiments

Most recent first
  • Shorter system prompt
    Running
    exp-14
  • Retrieval with reranking
    Won
    exp-13
  • Temperature 0.2
    Lost
    exp-12

Latency

Milliseconds, by hour

Installation

npx shadcn@latest add @eskais/dashboard-grid

Usage

Import
import {  DashboardCard,  DashboardChart,  DashboardGrid,  dashboardLabels,  DashboardMeter,  DashboardStat,  DashboardStats,} from "@/components/ui/dashboard-grid"

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

PropTypeDefault
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 | 43
labelsLabels every card shares; a card's own `labels` win.Partial<DashboardLabels>–
headingLevelThe level of the cards' titles. Default 2.2 | 3 | 42

Also takes <div> attributes.

DashboardStats

PropTypeDefault
aria-labelrequiredstring–
loadingMarks the row busy while its figures load; `DashboardStat loading` draws each placeholder.booleanfalse

Also takes StatGroup.

DashboardStat

Takes Omit<ComponentProps<typeof Stat>, "children"> &.

DashboardCard

Takes DashboardCardBase &.

DashboardChart

PropTypeDefault
configrequiredChartConfig–
childrenrequiredReactNode–
aria-labelNames the chart when the card's title doesn't.string–

Also takes <figure> attributes except children, aria-label, aria-labelledby.

DashboardMeter

PropTypeDefault
labelrequiredReactNode–
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 DashboardStatsProps

Accessibility

  • 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.