Skip to content
Thrum

Finance dashboard

A finance page from plain data: cash balance, runway, burn and revenue, the period's cash flow as a waterfall, spend against budget per department, expenses by category, revenue and expenses by month, and recent invoices. Every amount is written in the currency you pass; for product metrics pick the overview dashboard instead.

Install

npx shadcn@latest add @thrum-pro/finance-dashboard

This is a Pro component. The command works once your project has a licence key: set up Pro or see pricing.

Automatically installs icons arrow-down, arrow-up and arrow-up-down from the icon set.

Data shape

Type
type FinanceFigure = { value: number; delta?: number; deltaLabel?: string; trend?: readonly (number | null)[] };

type FinanceDashboardData = {
  summary?: { cash?: FinanceFigure; runway?: FinanceFigure; burn?: FinanceFigure; revenue?: FinanceFigure }; // runway in months
  cashFlow?: readonly { label: string; value: number | null; kind?: "change" | "total" }[];
  budgets?: readonly { name: string; spent: number | null; budget: number }[];
  expenses?: readonly { name: string; value?: number | null; children?: readonly { name: string; value?: number | null }[] }[];
  monthly?: { labels: readonly string[]; revenue: readonly (number | null)[]; expenses: readonly (number | null)[] };
  invoices?: readonly { id: string; customer: string; amount: number; due: string; dueDate?: string; status: "paid" | "due" | "overdue" }[];
};
Sample
{
  summary: { cash: { value: 2480000, delta: -0.04, deltaLabel: "vs last month" }, runway: { value: 18.5 } },
  cashFlow: [{ label: "Opening", value: 2580000, kind: "total" }, { label: "Payroll", value: -246000 }, { label: "Closing", value: null, kind: "total" }],
  budgets: [{ name: "Engineering", spent: 182000, budget: 200000 }],
  invoices: [{ id: "INV-2041", customer: "Northwind", amount: 12400, due: "12 Dec", dueDate: "2026-12-12", status: "due" }],
}

Props

PropTypeDefaultDescription
titlestringRequiredThe heading of the dashboard. It also names the dashboard's region for screen readers.
dataFinanceDashboardDataRequiredThe data for the chosen period, one key per section. A section whose key is left out is not drawn, and the grid closes up.
currencystringDefault "USD"ISO 4217 code for every amount. Tiles and charts write amounts compactly ($2.5M); the invoice table writes them in full ($12,400.00).
loadingbooleanDefault falseDraw every section as a skeleton and mark the dashboard busy while the data loads.
periodsreadonly { value: string; label: string }[]Default Month, Quarter, YearPeriods offered in the header. Pass fewer than two to hide the control.
periodstring–The selected period, when the parent holds it. Use it with onPeriodChange.
defaultPeriodstring–The period selected at first, when the control holds it itself. Defaults to the first period.
onPeriodChange(period: string) => void–Called with the new period. Answer it by passing the data for that period; the dashboard does not fetch or filter anything itself.
actionsReactNode–Buttons at the end of the header row, after the period control.
titlesPartial<Record<keyof FinanceDashboardData, string>>–Section headings to use in place of the English defaults: Key figures, Cash flow, Spend against budget, Expenses by category, Revenue and expenses, Recent invoices.
headingLevel1 | 2 | 3 | 4 | 5Default 2The level of the dashboard's heading. Section headings are one level below it.
pausedbooleanDefault falseFreeze the loading shimmer where it is.
localestringDefault "en-US"Locale for every number and amount on the dashboard.
soundbooleanDefault trueLet the parts make their sounds, if the visitor has sound on. Set it to false to silence the whole dashboard.
classNamestring–Sets the size. The layout follows the width of the dashboard itself, so it also works in a narrow column.

Motion and sound

Motion

  • First draw, every time the dashboard mounts: the headline numbers appear at once, the waterfall steps and the budget bars grow one after another, the tiles of the treemap appear, the monthly bars grow and the net line is drawn, and the invoice rows fade in one by one. All of it ends within about one second.
  • A new period: every number rolls and every chart moves to its new values in about 400 ms with no overshoot.
  • The layout itself never animates, and nothing loops.
  • Reduced motion: everything appears complete and changes instantly.

Sound

  • The dashboard has no sounds of its own; its parts play theirs.
  • A soft click when the period changes, a tick as a chart cursor moves from point to point, and one short tone when the headline numbers land on new values.
  • Nothing plays when the dashboard first appears.

Sound is off until the visitor turns it on. Pass sound={false} to keep this component silent. How sound works

Accessibility

  • The dashboard is a region named by its title. Each panel is a section with its own heading, one level below the title; the headline numbers have a heading for screen readers only.
  • Every chart keeps its own hidden data table and its own spoken cursor. The budget rows read spend, budget and the band (Under budget, Near budget, Over budget) in words.
  • Invoice status is a word in a badge (Paid, Due, Overdue), never colour alone. Amounts are right-aligned in figures of equal width.
  • The layout is one column when the dashboard is narrow, two from 42rem and three from 64rem, measured on the dashboard itself. The reading order is the same in all three.
  • Each panel is a panel surface: under frosted glass it turns translucent, and nothing inside it paints a solid fill over the glass.
  • The column headings of the invoice table and the word “Period” on the control are English and fixed in this version; change them in the file.
KeysAction
TabMove through the period, the actions, the waterfall, the budget chart, the treemap, the monthly chart and the invoice table, in reading order.
← →On the period: pick the next one. On a chart: move the cursor one step. On the invoice table: scroll it sideways when it does not fit.
↑ ↓On the budget chart: move from department to department.
Home / EndOn the period or a chart: jump to the first or last.
EscOn a chart: hide the cursor.

Source

SourcePro

The source comes with Pro

TypeScript source · Copy-paste ready · MIT-compatible for client projects · Includes all dependencies

Files and dependencies

Adds
components/finance-dashboard.tsx
Packages
None
Brings along
Dashboard foundationsKPI gridWaterfall chartBullet chartTreemapCombo chartTableBadgeSegmented controlSkeletonChart foundationsMotion tokensSound engine
Icons
arrow-downarrow-uparrow-up-down

Changelog

  1. 1.0.0 · 2026-12-03First release.

Loading index…

Keyboard shortcuts

/Ctrl KSearch components, docs and actions
?Show this list
AAppearance studio
SSound on or off
MFull or reduced motion
TTheme: auto, light, dark
GSurface: solid or frosted
BBackdrop photograph (under glass)
CCorner radius: square to round
RReplay the demo, on a component page
DDraw new data, on a component page
←→HomeEndMove the cursor in a focused chart
EscClose a dialog, or leave a chart cursor