Once UI Handbook
Beginner Guides
What is Once UI?
Install & config
Page skeleton
Your first page
Build And Launch
How to launch a portfolio site that actually gets you hired
How to build a documentation site with MDX and Next.js
How to ship a landing page and dashboard with authentication in Next.js
How to launch a social app with Next.js and Supabase
Vibe Coding
Introduction to vibe coding
Set up your local dev environment
Essential tools for vibe coding
Build your first Once UI app
Common Patterns
Hero section
Static panel
Form layout
Highlighted card
Responsive stacking
Decoration layers
Dialog & modal
Toast & feedback
Tables & lists
Loading states
App shell navigation
Dashboard & charts
Chat & messaging
Auth & verification
Settings & split panels
Data filters & toolbar
Command palette
Pricing & plans
Accordion & FAQ
Media & uploads
Empty & error states
SEO, Open Graph, and structured data
Documentation code blocks with live preview
Carousels, galleries, and before/after comparisons
Date pickers and scheduling
Context menus and dropdown actions
Tags, chips, and multi-value inputs
Roadmap & kanban
Form inputs & controls
Progress, status & badges
Scrolling & feeds
Profile, avatars & identity
Social proof & logo clouds
Masonry & media grids
Table pagination, search & bulk selection
Banners & announcements
Footer layouts
Onboarding & first run
Waitlist & coming soon
Design Tips
Color & surfaces
Harness overview
Row, Column & Grid
Spacing & rhythm
Icons & buttons
Reveal & motion
Theme tokens, FOUC-free init, and runtime style controls
Tooltips and hover cards
Block updates
Block updates changelog
Agent Resources
Column, not Flex
Semantics over CSS
Typography scale
Common gotchas
Block anchors
Validate generated code
Pro block registry
Match task bundles
TrademarkTrademark
Ctrl k
Search...
Sign up
Once UI Handbook
Beginner Guides
What is Once UI?
Install & config
Page skeleton
Your first page
Build And Launch
How to launch a portfolio site that actually gets you hired
How to build a documentation site with MDX and Next.js
How to ship a landing page and dashboard with authentication in Next.js
How to launch a social app with Next.js and Supabase
Vibe Coding
Introduction to vibe coding
Set up your local dev environment
Essential tools for vibe coding
Build your first Once UI app
Common Patterns
Hero section
Static panel
Form layout
Highlighted card
Responsive stacking
Decoration layers
Dialog & modal
Toast & feedback
Tables & lists
Loading states
App shell navigation
Dashboard & charts
Chat & messaging
Auth & verification
Settings & split panels
Data filters & toolbar
Command palette
Pricing & plans
Accordion & FAQ
Media & uploads
Empty & error states
SEO, Open Graph, and structured data
Documentation code blocks with live preview
Carousels, galleries, and before/after comparisons
Date pickers and scheduling
Context menus and dropdown actions
Tags, chips, and multi-value inputs
Roadmap & kanban
Form inputs & controls
Progress, status & badges
Scrolling & feeds
Profile, avatars & identity
Social proof & logo clouds
Masonry & media grids
Table pagination, search & bulk selection
Banners & announcements
Footer layouts
Onboarding & first run
Waitlist & coming soon
Design Tips
Color & surfaces
Harness overview
Row, Column & Grid
Spacing & rhythm
Icons & buttons
Reveal & motion
Theme tokens, FOUC-free init, and runtime style controls
Tooltips and hover cards
Block updates
Block updates changelog
Agent Resources
Column, not Flex
Semantics over CSS
Typography scale
Common gotchas
Block anchors
Validate generated code
Pro block registry
Match task bundles
TrademarkTrademark
Once UIDocumentationBlog
© Once UI. All rights reserved.
Built with Aveiro

Dashboard & charts

KPI stat rows, CountFx viewport latches, sparkline charts, and activity tables.
Updated 19d ago
App shell navigation
Chat & messaging
8 min · Pattern
Dashboards combine KPI stat rows, time-range filters, charts, and activity tables. The harness gold example shows the Once UI recipe — static surfaces for stats, interactive Card only when the tile is clickable.

Dashboard anatomy

A typical analytics dashboard has four zones:
  • Page header — eyebrow, title, time-range filter
  • KPI row — 3–4 stat cards in a responsive Grid
  • Chart area — trend lines or bar charts
  • Activity table — recent events with status tags
Task bundle: packages/core/ai/tasks/dashboard.json
Gold example: packages/core/ai/examples/dashboard.tsx
Pro block: packages/core/ai/examples/blocks/Dashboard1.tsx

Page header with filter

Stack the title and SegmentedControl on mobile, side-by-side on desktop:

KPI stat cards — static surface, not Card

This is the #1 dashboard mistake: wrapping KPI numbers in Card. Stat tiles are read-only panels. Use the static surface recipe: For animated numbers, swap the Heading for CountFx in your TSX — drive value from a useInViewport latch so the count starts when the row scrolls into view. Reserve Card for tiles that are clickable links to a detail view.

Staggered reveal

Wrap each stat in RevealFx with incremental delay for a polished entrance:
<Row
  fillWidth
  horizontal="between"
  vertical="end"
  gap="24"
  s={{ direction: "column", horizontal: "start" }}
>
  <Column gap="8">
    <Text variant="label-default-s" onBackground="brand-medium">
      Analytics
    </Text>
    <Heading as="h1" variant="display-strong-s">
      Overview
    </Heading>
  </Column>
  <SegmentedControl
    selected={range}
    onToggle={setRange}
    buttons={[
      { value: "7d", label: "7 days" },
      { value: "30d", label: "30 days" },
      { value: "90d", label: "90 days" },
    ]}
  />
</Row>
<Column
  background="surface"
  border="neutral-alpha-weak"
  radius="l"
  padding="24"
  gap="16"
>
  <Row fillWidth horizontal="between" vertical="center">
    <Text variant="label-default-s" onBackground="neutral-weak">
      Revenue
    </Text>
    <Icon name="trendUp" size="s" />
  </Row>
  <Heading variant="display-strong-xs">$128,400</Heading>
  <Text variant="body-default-s" onBackground="success-weak">
    +12.4%
  </Text>
</Column>
<RevealFx fill trigger={seen} translateY="8" delay={index * 0.1}>
  <Column background="surface" border="neutral-alpha-weak" radius="l" padding="24" gap="16">
    <Text variant="label-default-s" onBackground="neutral-weak">Revenue</Text>
    <Heading variant="display-strong-xs">$128,400</Heading>
  </Column>
</RevealFx>
Keep total stagger under ~0.4s for a row of four cards.

Charts and sparklines

For inline sparklines inside interactive stat cards, use LineChart as an absolute background layer inside Card:
Set pointerEvents="none" on the chart — same rule as decoration layers.

Activity table

Use Table with Tag cells for status. See tables and lists for column definitions.
Build rows with event name, a Tag for status, and a time string. Swap Tag variants (success, brand, danger) to match event type.

Quality checklist

Check
Rule
Stat surfacesColumn with background="surface" — not Card
KPI numbersCountFx with viewport latch, or display-strong-s static
Gridcolumns="4" m={{ columns: 2 }} s={{ columns: 1 }}
Chart overlaypointerEvents="none", axis="none" for sparklines
App shellCompose Header1 + Sidebar1 from Pro blocks

Agent note

dashboard.json lists gotcha keys: Card.interactive, CountFx.trigger, RevealFx.delay. Load them from gotchas.json before generating.

Related

→ Static panel → Tables and lists → App shell navigation
<Card
  fillWidth
  paddingX="20"
  paddingTop="20"
  paddingBottom="80"
  radius="l"
  border="neutral-alpha-weak"
  background="transparent"
  href="/analytics/revenue"
>
  <LineChart
    position="absolute"
    left="0"
    bottom="0"
    height={6}
    pointerEvents="none"
    opacity={30}
    axis="none"
    tooltip={false}
    legend={{ display: false }}
    grid="none"
    series={[{ key: "Current period", color: "green" }]}
    data={sparkData}
  />
  <Column fillWidth gap="12">
    <Heading variant="display-strong-xs">$128,400</Heading>
  </Column>
</Card>