Dashboard
dashboardA full application screen: navigation with a usage meter, a metric row with trends, a revenue chart with a range control, a channel bar list, a sortable invoice table with search and paging, and the payout schedule. Bring your data as props — every list and number is yours.
import { Dashboard, type DashboardOrder, type DashboardRevenueRow } from "@/components/forme/templates/dashboard/dashboard";
/** Deterministic sample data, so the preview is the same on every render. */
let seed = 42;
const rnd = () => (seed = (seed * 16807) % 2147483647) / 2147483647;
const revenue: DashboardRevenueRow[] = [];
let value = 18.4;
for (let day = 89; day >= 0; day--) {
const date = new Date(2026, 9, 11);
date.setDate(date.getDate() - day);
value = Math.max(12, value + 0.18 + (rnd() - 0.5) * 4.2);
revenue.push({
date: date.toLocaleDateString("en-US", { month: "short", day: "numeric" }),
revenue: Math.round(value * 1000),
expansion: Math.round(value * 1000 * (0.3 + rnd() * 0.08)),
});
}
const kpis = [
{
id: "mrr",
label: "MRR",
value: "$48,210",
delta: 0.124,
deltaLabel: "vs last month",
trend: [28, 31, 30, 35, 34, 39, 42, 41, 46, 50, 54, 58],
},
{
id: "users",
label: "Active users",
value: "8,942",
delta: 0.031,
deltaLabel: "vs last month",
trend: [61, 64, 62, 68, 70, 69, 74, 73, 78, 81, 84, 89],
},
{
id: "conversion",
label: "Conversion",
value: "3.42%",
delta: -0.004,
deltaLabel: "vs last month",
trend: [41, 40, 42, 39, 38, 39, 36, 37, 35, 36, 34, 34],
},
{
id: "churn",
label: "Churn",
value: "1.8%",
delta: -0.003,
invertDelta: true,
deltaLabel: "lower is better",
trend: [24, 25, 23, 24, 22, 23, 21, 22, 20, 21, 19, 18],
},
];
const channels = [
{ name: "Direct", sessions: 12840 },
{ name: "Organic search", sessions: 9120 },
{ name: "Referral", sessions: 4730 },
{ name: "Social", sessions: 4050 },
{ name: "Email", sessions: 3010 },
];
const orders: DashboardOrder[] = [
{ id: "INV-2317", customer: "Ada Kim", status: "Paid", issued: "2026-10-09", amount: 1240 },
{
id: "INV-2316",
customer: "Marcus Chen",
status: "Pending",
issued: "2026-10-09",
amount: 860.5,
},
{
id: "INV-2315",
customer: "Luna Rodrigues",
status: "Paid",
issued: "2026-10-08",
amount: 2310,
},
{
id: "INV-2314",
customer: "Priya Natarajan",
status: "Failed",
issued: "2026-10-08",
amount: 540,
},
{ id: "INV-2313", customer: "Tom Okafor", status: "Paid", issued: "2026-10-07", amount: 1095.25 },
{
id: "INV-2312",
customer: "Sofia Marchetti",
status: "Refunded",
issued: "2026-10-06",
amount: 720,
},
{ id: "INV-2311", customer: "Jonas Weber", status: "Paid", issued: "2026-10-05", amount: 3480 },
{
id: "INV-2310",
customer: "Mei Tanaka",
status: "Pending",
issued: "2026-10-04",
amount: 415.75,
},
];
export function DashboardDemo() {
// Full bleed: the preview figure already draws the frame, so the dashboard
// fills it to the edges like an app window — the negative margins cancel the
// figure's padding, and the height is the window the block assumes.
return (
<div data-frame="fill" className="-m-6 h-[640px] sm:-m-8">
<Dashboard kpis={kpis} revenue={revenue} channels={channels} orders={orders} />
</div>
);
}Install
Adds the component, its registry dependencies, and the token stylesheet you import once.
API reference
Read from the source, so it is the API of the file you install. A prop marked * is required.
Dashboard
| Prop | Type | Default | Description |
|---|---|---|---|
kpis* | readonly DashboardKpi[] | — | |
revenue* | readonly DashboardRevenueRow[] | — | The revenue series, oldest first. The range control takes the last 7 or 30 rows for those ranges and everything you pass for the full range — bring ninety days and all three ranges work. |
channels* | readonly DashboardChannel[] | — | |
orders* | readonly DashboardOrder[] | — | |
className | string | — | |
brand | string | "Acme Inc" | |
user | { name: string; initials: string } | { name: "Ada Kim", initials: "AK" } |
Related
ProFile Folders
A files workspace: folders with access filters, sort, search and a grid/list view, plus reusable file templates with a scope, type filter and their own sorting — all inside a shared workspace shell.
saas
ProIntegrations Directory
A workspace integrations screen: grouped app directory with connect states, All/Connected/Available filters, search, expandable rows and a request-an-integration form — inside a shared workspace shell with projects, news and a getting-started checklist.
saas
ProAnalytics Dashboard
A complete analytics screen: collapsible navigation, a metric row with sparklines, a filterable area chart, and a sortable activity table. Everything is a plain component you can take apart.
saas