Skip to content

Dashboard Page

One page of a dashboard: a title with its actions, a row of key numbers, then your content. It sits inside DashboardShell but works anywhere. The title is the page's h1.

Blockv0.1.0experimentalWCAG 2.2 AAView spec

A ready-made piece, built from the library's own parts.

A block puts several components together into something you would otherwise assemble by hand. It never fetches data: you give it the data, or answer its callbacks. It is copied into your project like any component, with the parts it uses, so you can change anything.

Basic

Full screen (opens in a new tab)

Customers

Everyone on a plan, with what they pay.

Key numbers

Customers: 1,284. Up 3.2% compared with last month.
Monthly revenue: $48,200. Up 12% compared with last month.
Churn: 1.8%. Down 0.4% compared with last month, an improvement.
Trials: 36. 9 end this week

Overview

Full screen (opens in a new tab)

Overview

How the shop did in the last 30 days.

Key numbers

Revenue: $71,400. Up 12.4% compared with last month.
Orders: 1,284. Up 4.1% compared with last month.
Refund rate: 1.9%. Down 0.3% compared with last month, an improvement.
New customers: 312. Up 8% compared with last month.

Revenue

Monthly totals for the year

Revenue by monthArea chart of Revenue across 10 points. Revenue is highest at $71,400 (Oct) and lowest at $21,000 (Jan).

Recent activity

What happened today and yesterday

  • Maya Chen upgraded Harbor & Pine to the Team plan12 minutes ago
  • Invoice INV-2207 was sent to Lumen Works1 hour ago
  • Tomas Reyes left a note on ORD-48173 hours ago
  • A refund of $74.00 was issued for ORD-4818Yesterday

Recent orders

The latest five

OrderCustomerTotalStatus
ORD-4821Northwind Studio$1,240.00Paid
ORD-4820Harbor & Pine$386.50Pending
ORD-4819Lumen Works$2,910.00Paid
ORD-4818Fieldnote Co.$74.00Refunded
ORD-4817Quarry Labs$540.25Failed

Goals this quarter

Progress to each target

Revenue target71%
New customers52%
Refund rate under 2%95%

Upcoming

Reviews, payouts and deadlines

October 2026

Sunday
Monday
Tuesday
Wednesday
Thursday
Friday
Saturday

Loading

Full screen (opens in a new tab)

Customers

Key numbers

Loading Customers
Loading Monthly revenue
Loading Churn
Loading Trials

Installation

npx rdloom add dashboard-page

Copies the source into src/components/rdloom. Edit it freely: rdloom upgrade merges later versions into your changes.

Use another registry client
npx shadcn@latest add https://rdloom.vimalbhatt.com/r/dashboard-page.json

Works, but without upgrade tracking.

Usage

import { Button, DashboardPage } from "@rdloom/react";

<div className="mx-auto w-[56rem] max-w-full">
  <DashboardPage
    title="Customers"
    description="Everyone on a plan, with what they pay."
    actions={
      <>
        <Button variant="secondary">Export</Button>
        <Button>Add customer</Button>
      </>
    }
    stats={[
      { label: "Customers", value: 1284, trend: { change: 3.2, label: "vs last month" } },
      { label: "Monthly revenue", value: "$48,200", trend: { change: 12, label: "vs last month" }, data: [31, 34, 33, 38, 41, 44, 48] },
      { label: "Churn", value: "1.8%", trend: { change: -0.4, goodWhen: "down", label: "vs last month" } },
      { label: "Trials", value: 36, description: "9 end this week" },
    ]}
  />
</div>

API Reference

Defined by the spec. Components also accept the props of the React Aria component they wrap.

PropTypeDefault
titlerequired

The page's title, shown as its h1.

stringnone
description

One or two sentences under the title.

stringnone
actions

Buttons for the right of the title, e.g. Export and Add customer.

nodenone
stats

The key numbers shown in a row of cards under the title: label, value, and optionally a trend, a small history and a note.

DashboardStat[]none
isLoading

Show the key numbers as skeletons and mark the page busy.

booleanfalse
children

The rest of the page: charts, tables, forms.

nodenone
classNames

Extra class names for single parts, so you can restyle one part without editing the file. Keys: root, header, title, description, actions, stats, stat, content.

Partial<Record<"root" | "header" | "title" | "description" | "actions" | "stats" | "stat" | "content", string>>none

Accessibility

Role none, WCAG 2.2 AA. Tested with axe and keyboard tests; screen reader checks are in the audit checklist.

Keyboard

  • Tab: moves through the actions, then the page content

Screen readers announce

  • "Customers, heading level 1"
  • "Key numbers" section, then "Monthly revenue: $48,200. Up 12% compared with last month."

What your code must do

  • The title is the page's only h1, so there is one clear heading to jump to
  • The key numbers are a labelled section (heading "Key numbers", read only by screen readers) and each one reads as a sentence
  • Columns share the width equally, so a long number never pushes the others off screen; two columns on a phone, four on a wide screen
  • While loading the page is marked busy and numbers are skeletons, never made-up values

Block contract

Data
A title, an optional description, and stats as plain objects.
Data states
loading, ready
Permissions
None yet
Events
None
You can replace
classNames for each part; actions slot; children; the Stat cards it draws; the PageHeader it is built on

Guidelines

Use it when

  • The top of any page inside a dashboard

Avoid it when

  • Pages with a long form as the main content: use a plain heading and the form

Don't

  • More than one h1 on a page
  • Showing placeholder numbers while data loads

Design tokens

The semantic tokens this component uses. Change them once and every component follows; see Design tokens.

  • --rd-color-text-default
  • --rd-color-text-muted
  • --rd-color-surface-default
  • --rd-color-border-default