Skip to content
Thrum

Sales dashboard

Revenue, pipeline and deals on one screen: headline numbers, revenue against target, quota per team, the pipeline as a funnel, revenue by region and the largest open deals. Every section is optional and the layout closes up around a missing one. For a general first screen pick the overview dashboard; for recurring revenue pick the SaaS metrics dashboard.

Install

npx shadcn@latest add @thrum-pro/sales-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 SalesDashboardData = {
  kpis?: readonly {
    label: string;
    value: number | null;
    format?: Intl.NumberFormatOptions;
    delta?: number | null;                     // 0.124 is +12.4%
    deltaLabel?: string;                       // "vs last quarter"
    invert?: boolean;                          // a fall is good news
    trend?: readonly (number | null)[];
  }[];
  revenue?: { labels: readonly string[]; actual: readonly (number | null)[]; target?: readonly (number | null)[] };
  pipeline?: readonly { name: string; value: number | null }[];      // stages, first to last
  breakdown?: readonly { name: string; value: number | null; href?: string }[];
  deals?: readonly {
    id: string;
    name: string;
    company?: string;
    owner: { name: string; image?: string };
    stage: string;
    stageTone?: "neutral" | "primary" | "outline" | "success" | "warning" | "destructive";
    closeDate?: string;                        // "2026-12-18"
    amount: number | null;
  }[];
  quota?: readonly { name: string; value: number | null }[];        // 0.82 is 82% of quota
};
Sample
{
  kpis: [{ label: "Revenue", value: 1284000, format: { style: "currency", currency: "USD", maximumFractionDigits: 0 }, delta: 0.084, deltaLabel: "vs last quarter" }],
  revenue: { labels: ["Oct", "Nov", "Dec"], actual: [402000, 431000, 451000], target: [400000, 420000, 440000] },
  pipeline: [{ name: "Qualified", value: 2400000 }, { name: "Proposal", value: 1300000 }, { name: "Won", value: 520000 }],
  deals: [{ id: "d1", name: "Annual renewal", company: "Northwind", owner: { name: "Ada Brook" }, stage: "Proposal", amount: 84000 }],
}

Props

PropTypeDefaultDescription
titlestringRequiredThe heading of the dashboard. It also names the dashboard's region.
dataSalesDashboardDataRequiredThe figures to draw, one key per section. A key left out is a section not drawn. See the type above.
headingLevel1 | 2 | 3 | 4 | 5Default 2Level of the dashboard's heading. Each section's heading is one level below it.
periodsreadonly { value: string; label: string }[]–Time ranges offered in the header. Leave it out, or pass fewer than two, to hide the control.
periodstring–The selected range, when the parent holds it. Use it with onPeriodChange.
defaultPeriodstring–The range selected at first, when the control holds it itself.
onPeriodChange(period: string) => void–Called with the new range. Answer it by passing the data for that range; the dashboard does not fetch or filter anything itself.
actionsReactNode–Buttons at the end of the header row, such as Export or Share.
loadingbooleanDefault falseDraw every section, with or without data, as a skeleton of its size, and mark the dashboard busy.
currencystringDefault "USD"ISO 4217 code for every amount: whole units in the table, compact amounts on axes and bars.
breakdownTitlestringDefault "Revenue by region"Heading of the ranked list. Change it when the list holds reps or products.
localestringDefault "en-US"Locale for every number and date 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 view: the cards fade in and rise 8 px one after another, 40 ms apart. Headline numbers and amounts appear at once, bars grow, the target line is drawn left to right, the quota rings sweep round, and the table rows fade in in order. All of it ends within about 1.5 s.
  • New data or a new time range: every number rolls and every chart moves to its new values together, in about 400 ms with no overshoot. Nothing is redrawn from nothing.
  • The layout never animates. Cards keep their size while their contents change.
  • Reduced motion: everything appears complete and changes instantly.

Sound

  • The dashboard has no sounds of its own. Its parts play theirs, if the visitor has sound on.
  • A soft click when the time range changes, one short tone when the headline numbers land on new values, and a tick as a chart cursor moves from point to point.
  • 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 card is a section with a heading one level below the title; the headline numbers have a heading for screen readers only.
  • Every chart keeps its own spoken cursor and hidden data table. Each headline number is a group named by its label, and the change chip says up or down in words.
  • The deals table is a scrolling region named “Top open deals”. Each owner is read once, by name; a stage is a word, never only a colour.
  • The layout is one column when the dashboard is narrow, two from 42rem and a wide card beside a narrow one from 64rem, measured on the dashboard itself. The reading order is the same in all three.
  • Under frosted glass each card turns translucent; nothing inside paints a solid block over it.
  • The words “Time range”, “Top open deals” and the column headings are English and fixed in this version; change them in the file.
KeysAction
TabMove through the time range, the actions, each chart, the ranked list and the deals table, in reading order.
← →On the time range: pick the next range. On a chart: move the cursor one point.
Home / EndOn the time range 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/sales-dashboard.tsx
Packages
motion
Brings along
Dashboard foundationsAnimated numberAvatarBadgeBar listCombo chartFunnel chartRadial bar chartTableChart 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