YuhuanStudioYunUIDocs
Patterns

Dashboard States

TableState, StatGrid, SectionRow and DashboardPage — the small dashboard blocks repeated dozens of times.

Four small dashboard building blocks that Yunxin repeated dozens of times without ever extracting: the empty/loading line inside a table, the stat tile row, the page content column, and a section title with a trailing action.

Import

tsx
1import { TableState, StatGrid, DashboardPage, SectionRow } from "@yuhuanowo/yunui/patterns";

TableState

The single muted line an empty or loading table shows in place of rows. Yunxin repeats this 39 times in three different spellings. This is deliberately not EmptyState — that is the full-screen icon + title + description + action block; this is the one-line cell inside a table.

Empty & loading

No results match those filters.
Loading transactions…

StatGrid

The responsive tile row at the top of a dashboard page — two up on phones, columns up from sm.

Stat grid

Balance
$1,250
Members
48

SectionRow

A section title with a trailing control on the same baseline. Not the page header — that is PageHeader.

Section row

Recent activity

Nothing yet.

DashboardPage

The capped, centered content column with the house rhythm between sections. Distinct from PageLayout, which is the marketing shell with a navbar and footer.

tsx
1<DashboardPage>
2 <PageHeader title="Billing" />
3 <StatGrid>{tiles}</StatGrid>
4 <SectionRow title="Invoices" action={<Button size="sm">Export</Button>} />
5 {table}
6</DashboardPage>

Props

PropTypeDefaultDescription
children*ReactNodeThe message — "No results", "Nothing to review".
loadingbooleanfalseShow a spinner before the message.
surface"plain" | "card"plainVertical padding. `card` also draws the card surface.
PropTypeDefaultDescription
columns2 | 3 | 44Columns at the widest breakpoint.
PropTypeDefaultDescription
actionReactNodeTrailing control — a button, a filter, a link.
title*ReactNodeSection title.
PropTypeDefaultDescription
width"5xl" | "6xl" | "7xl"7xlMax content width.

On this page