Skip to content

SaaS Revenue Dashboard for React

A SaaS dashboard template for React that tracks MRR, churn and cohort retention in glass charts. Use it as a revenue dashboard for the revenue page of a subscription product, showing MRR, ARR, churn rate and ARPU as rolling numbers with deltas and sparklines.

With demo data:npx shadcn@latest add https://lokendra-builds.github.io/sheenui/r/analytics-demo-saas.json

SaaS revenue

last 7 days

  • SaasRevenueDashboard
  • DeltaBadge
  • RollingNumber
  • defaultSaasRevenueLabels
  • +2 more

Live demo

Twelve months of MRR by default. Turn on Live to watch upgrades land on the latest point; switch regions and every chart, the cohorts and the customer list follow. Sort the customers by MRR, seats, change or tenure.

Acme Cloud

Revenue · Last 12 months

MRR by plan

Monthly recurring revenue, stacked · Last 12 months

  • Starter
  • Pro
  • Business
  • Enterprise

Plan mix

Share of MRR

MRR movement

From the start to the end of the range

Retention

Customers still paying, by monthly cohort

Top customers

By monthly recurring revenue

Files to copy

19 folders · 54 files · 4 packages
From theme/src/
  • blocks/{analytics-saas.tsx, analytics-kit.ts, icons.tsx}
  • components/button/
  • components/charts/{chart-export-menu.tsx, chart-export.ts, chart-figure.tsx, chart-fit.tsx, chart-icons.tsx, chart-parts.tsx, chart-patterns.tsx, chart-tip.tsx, chart-utils.ts, cohort-chart.tsx, donut-chart.tsx, heatmap.tsx, percent-bar-chart.tsx, pie-chart.tsx, sparkline.tsx, stacked-area-chart.tsx, waterfall-chart.tsx}
  • components/charts/chart-parts/
  • components/charts/cohort-chart/
  • components/charts/heatmap/
  • components/drawer/parts/sheet.tsx
  • components/kbd/
  • components/menu/
  • components/segmented/
  • components/skeleton/
  • components/spinner/
  • components/status-icons/
  • components/tabs/
  • blocks/analytics/{bar-trend-chart.tsx, data.ts, glass.tsx, hooks.tsx, kpi.tsx, labels.ts, panel.tsx, shell.tsx, stacked-trend-chart.tsx, trend-chart.tsx, trend-frame.tsx}
  • hooks/{use-controllable.ts, use-direction.ts, use-intersection.ts, use-latest.ts, use-magnetic.ts, use-media-query.ts, use-preferences.ts}
  • motion/{beat.ts, gate.ts, tokens.ts}
  • lib/{cn.ts, csv.ts, form.ts, glide-highlight.tsx, heading.ts, initials.ts, math.ts, no-script-reveal.tsx, popup-a11y.ts, popup-motion.ts, state-light.tsx, warn-once.ts}
  • styles/
shadcn CLI (component only)
npx shadcn@latest add https://lokendra-builds.github.io/sheenui/r/analytics-saas.jsonRegistry item: analytics-saas. The styles need the Tailwind v4 glass UI setup.
Packages
pnpm add @base-ui/react clsx motion tailwind-merge

Next.js: samples here pass functions (formatters, seriesLegend, a dashboard's load), so put them in a file that starts with "use client".

Euros, German, Europe only

currency and locale format every amount in euros, German style; defaultFilters starts on one region; labels translate every string, including the cohort columns ("Monat 3").

Nordlicht Software

Umsatz · Letzte 90 Tage

MRR nach Tarif

Monatlich wiederkehrender Umsatz, gestapelt · Letzte 90 Tage

  • Starter
  • Pro
  • Business
  • Enterprise

Tarifmix

Anteil am MRR

MRR-Bewegung

Vom Anfang bis zum Ende des Zeitraums

Bindung

Zahlende Kunden nach Monatskohorte

Top-Kunden

Nach monatlichem Umsatz

Loading, empty and error states

The frame never disappears: skeletons hold every panel's place on the first load, later loads dim the charts under a scan line, and an empty or failed load says so in words (with Retry when the loader threw). Pin a state with status for docs and tests.

Acme Cloud (status demo)

Revenue · Last 12 months

MRR by plan

Monthly recurring revenue, stacked · Last 12 months

  • Starter
  • Pro
  • Business
  • Enterprise

Plan mix

Share of MRR

MRR movement

From the start to the end of the range

Retention

Customers still paying, by monthly cohort

Top customers

By monthly recurring revenue

Data

load is required: SaasRevenueDashboard never invents numbers. Return your own data (or a promise of it) from load. For demos and prototypes use the sample loader and live step from the separate @sheenui/theme/demo-data module:

import { SaasRevenueDashboard } from "@/components/sheenui/blocks/analytics-saas";
// Package build (after the first npm release, or a packed tarball): import { SaasRevenueDashboard } from "@sheenui/theme";
import { saasRevenueDemoLoader, saasLiveStep } from "@/components/sheenui/blocks/analytics/demo-saas";
// Package build (after the first npm release, or a packed tarball): import { saasRevenueDemoLoader, saasLiveStep } from "@sheenui/theme/demo-data";

<SaasRevenueDashboard load={saasRevenueDemoLoader} liveStep={saasLiveStep} />

With the shadcn CLI the sample data is its own optional item, which also installs the dashboard (the “with demo data” command at the top of this page): npx shadcn@latest add https://lokendra-builds.github.io/sheenui/r/analytics-demo-saas.json. The “component only” command under Files to copy leaves the sample data out, which is what a production build wants.

Props

PropTypeDefaultDescription
load (required)AnalyticsLoader<SaasRevenueData>NoneLoads the data for a range + filters (sync or async). Required: no dashboard falls back to fake data. The demo loaders live in @sheenui/theme/demo-data, which the package root does not export.
liveStep((prev: SaasRevenueData, tick: number) => SaasRevenueData)NoneEvolves the data on each live tick (omit for no live updates). Return a new object; unchanged parts keep their identity.
rangeAnalyticsRangeNoneSets the active range when controlled. Pair with onRangeChange.
defaultRangeAnalyticsRangeper dashboardThe range at first when range is not controlled (AnalyticsRange); each dashboard picks its own.
onRangeChange((range: AnalyticsRange) => void)NoneCalled when the range changes.
activeFiltersstring[]NoneValues of the active filter chips (controlled).
defaultFiltersstring[]noneThe filters on at first when activeFilters is not controlled (string[], default none).
onFiltersChange((filters: string[]) => void)NoneCalled when the filter chips change.
livebooleanNoneSimulated live updates. The Live toggle pauses them (WCAG 2.2.2).
defaultLivebooleanper dashboardWhether live updates are on at first when live is not controlled (boolean); each dashboard picks its own.
onLiveChange((live: boolean) => void)NoneCalled when the Live toggle changes.
comparebooleanNoneShow the previous period (dashed lines, "vs" values).
defaultComparebooleanper dashboardWhether the comparison is on at first when compare is not controlled (boolean); each dashboard picks its own.
onCompareChange((compare: boolean) => void)NoneCalled when the Compare toggle changes.
statusAnalyticsStatus"auto"Pin a state (docs, tests); "auto" follows the loader.
productstring"Acme Cloud"Product shown as the title (string, default "Acme Cloud").
currencystring"USD"Sets the ISO 4217 currency of every amount.
rangesreadonly AnalyticsRange[]["7d", "30d", "90d", "12m"]Lists the ranges offered in the header.
filtersreadonly AnalyticsFilter[]NoneRegion filter chips. Their values reach load as filters.
onExport((data: SaasRevenueData) => void)a CSV of MRR by planCalled by Export (default: a CSV of MRR by plan).
headingLevelHeadingLevelOption2Heading level of the title (1 to 6), or "none" for a paragraph with no heading role (panel titles follow).
localestringthe runtime'sBCP 47 locale for every number and date (string, default the runtime's).
labelsPartial<SaasRevenueLabels>defaultSaasRevenueLabelsEvery other string, for translation: labels={{ range: "…" }}; omitted keys keep the English of defaultSaasRevenueLabels. All 49 keys of SaasRevenueLabels are listed in the key table under the props table.
classNamestringNoneAdds extra classes to the root <section> (string).
SaasRevenueLabels keys and English defaults (49)
Pass any key in labels; the rest keep the defaults of defaultSaasRevenueLabels.
KeyEnglish default
rangeTime range
ranges{ "24h": "24h", "7d": "7d", "30d": "30d", "90d": "90d", "12m": "12m" }
rangeNames{ "24h": "Last 24 hours", "7d": "Last 7 days", "30d": "Last 30 days", "90d": "Last 90 days", "12m": "Last 1...
filtersFilter by region
liveLive
liveDescriptionUpdate the numbers in real time
compareCompare
compareDescriptionCompare with the previous period
exportExport
exportedCSV downloaded
loadingLoading new data…
loadedDashboard updated
chartChart
tableTable
viewAs(title) => `${title}: view as`
change(direction, amount) => direction === "flat" ? "No change vs previous period" : `${direction === "up" ? "Up"...
noChangeNo change vs previous period
kpisRevenue metrics
vsPrevious(value) => `vs ${value} before`
previousPeriodPrevious period
changeLabelChange
chartInstructionsUse the left and right arrow keys to read values.
touchHintTouch and drag to read values
noDataNo data
errorTitleCouldn't load the dashboard
errorDescriptionThe data source didn't answer. Check your connection and try again.
retryTry again
emptyTitleNo data for this view
emptyDescriptionNothing was recorded in this time range with these filters. Try a longer range or clear the filters.
subtitle(range) => `Revenue · ${range}`
metrics{ mrr: "MRR", arr: "ARR", churnRate: "Churn rate", arpu: "ARPU" }
plans{ starter: "Starter", pro: "Pro", business: "Business", enterprise: "Enterprise" }
regions{ na: "North America", emea: "Europe", apac: "Asia-Pacific", latam: "Latin America" }
mrrByPlanMRR by plan
mrrByPlanDescriptionMonthly recurring revenue, stacked
planMixPlan mix
planMixDescriptionShare of MRR
movementMRR movement
movementDescriptionFrom the start to the end of the range
movementSteps{ starting: "Starting MRR", newBusiness: "New", expansion: "Expansion", reactivation: "Reactivation", contr...
cohortsRetention
cohortsDescription(period) => `Customers still paying, by ${period === "month" ? "monthly" : "weekly"} cohort`
cohortPeriodName(period, i) => `${period === "month" ? "Month" : "Week"} ${i}`
cohortSize(size) => `${size} customers`
customersTop customers
customersDescriptionBy monthly recurring revenue
columns{ customer: "Customer", plan: "Plan", mrr: "MRR", seats: "Seats", change: "Change", since: "Customer since", }
sortBy(column) => `Sort by ${column}`
dateDate

SaasRevenueData

PropTypeDefaultDescription
points{ label, long?, mrr: Record<plan, number> }[]NoneMRR by plan at each point (Starter, Pro, Business, Enterprise).
kpis / previousKpis{ mrr, arr, churnRate, arpu }NoneHeadline numbers; churn is a monthly ratio (0.022 = 2.2%).
trendsRecord<metric, number[]>NoneGives the sparkline values for each KPI, keyed by metric.
movement{ starting, newBusiness, expansion, reactivation, contraction, churn }NoneThe waterfall (contraction and churn as positive amounts).
cohorts / cohortPeriodCohortRow[] / "month" | "week"NoneTakes retention cohorts (customers still paying).
customers{ id, name, detail?, plan, mrr, previousMrr?, seats, since }[]NoneFills the top-customers table with these rows.

DeltaBadge props

PropTypeDefaultDescription
rationumber | nullNoneChange ratio (0.124 = +12.4%). null: nothing to compare; the badge renders nothing unless it has children.
changenumber | nullNoneAlias of ratio: the change as a fraction (0.124 = +12.4%); ratio wins when both are set.
goodWhen"up" | "down""up"Which direction is good news.
localestringthe runtime'sBCP 47 locale for the percentage (string, default the runtime's).
childrenReactNodeNoneVisible text instead of the percentage (e.g. "+$1,204 (2.1%)").
labelsPick<AnalyticsLabels, "change" | "noChange">defaultAnalyticsLabelsScreen-reader sentences. Spread defaultAnalyticsLabels and override single keys, e.g. labels={{ ...defaultAnalyticsLabels, change: "…" }}. All 2 keys of AnalyticsLabels are listed in the key table under the props table.
srLabel((direction: "up" | "down" | "flat", amount: string) => string)NoneScreen-reader sentence (direction + amount); overrides labels.
classNamestringNoneAdds extra classes to the pill (string).
AnalyticsLabels keys and English defaults (2)
Spread defaultAnalyticsLabels and override single keys in labels.
KeyEnglish default
change(direction, amount) => direction === "flat" ? "No change vs previous period" : `${direction === "up" ? "Up"...
noChangeNo change vs previous period

RollingNumber props

PropTypeDefaultDescription
value (required)numberNoneThe number to show (number, required); a non-finite value prints an en dash.
formatIntl.NumberFormatOptions | ((n: number) => string)NoneA formatter, or Intl.NumberFormat options (currency, percent, compact…) for locale.
localestringthe runtime'sBCP 47 locale for format when it is an options object (string, default the runtime's).
playbooleantrueHold the digits at 0 until true (e.g. until a card is in view).
rollInbooleantrueRoll in from zeros the first time the number is seen. Later changes roll from the previous value.
durationnumber0.6Seconds a roll takes.
classNamestringNoneAdds extra classes to the outer <span> (string).

Keyboard

KeysAction
Tab/Shift+TabMove through the header controls, the KPIs, each chart and its Chart / Table switch.
←/→Move the time range (Segmented control), the KPI tabs, the Chart / Table switch, or the point being read in a chart.
Home/EndFirst / last KPI tab, or first / last point of a chart.
Enter/SpaceToggle Live, Compare or a filter chip; press Export; sort a table column.
EscStop reading a chart (hides the crosshair and tooltip).
Enter/Space (table header)Sort the customers by that column; again to reverse (aria-sort is announced).

Accessibility

  • KPI deltas read in words and know which way is good: a falling churn rate is good news (green, “Down 9.9%”), a falling ARPU is not.
  • The waterfall labels every step with its signed value and shows increases and decreases with different shapes and colors; its table lists each step and the running total.
  • The cohort grid is navigable cell by cell with the arrow keys and has a % / users switch; cohorts that haven't reached a period read “not yet”, never 0%.
  • The customers table is a real table with sortable column buttons (aria-sort). On narrow screens the plan and start date fold under the name, so MRR and change stay visible without scrolling.
  • Reduced motion: values and charts jump, no draw-ins; the busy scan line becomes a still bar.

Performance

  • Charts below the fold mount when they come within 320px of the viewport; their frame is reserved first, so nothing shifts.
  • New data lands in a React transition, one panel per frame: visible panels ripple in order, panels off-screen catch up in idle time or when you scroll to them.
  • Controls answer instantly (optimistic state) while the dashboard re-renders in the background, so a click never blocks the next frame.
  • Loading dims the panels through a data attribute (CSS only): starting or finishing a load re-renders no chart.
  • Glass budget: the header, the KPI strip and at most two panels per row blur what's behind them; controls inside the header don't add their own blur. Phones get a lighter blur.
  • Live updates, the realtime stream and every pulse stop while the dashboard is off-screen or the tab is hidden. Only transform and opacity animate.

All exports on this page

  • DeltaBadge — "▲ 12.4%" on a status tint: the arrow and the sign carry the direction, colour only supports it.
  • RollingNumber — Odometer number for dashboards that update all the time: each digit is ONE element (a 0–9 column) moved by a CSS transform transition.
  • SaasRevenueDashboard — Props (see SaasRevenueDashboardProps): product ("Acme Cloud"), currency ("USD"), ranges (7d, 30d, 90d, 12m).
  • defaultSaasRevenueLabels — The English SaasRevenueLabels used when labels is omitted; a partial labels prop is merged over them.

When to use the SaaS revenue dashboard

  • Use it for the finance or growth screen of a subscription product, where MRR, ARR, churn rate and ARPU roll up as headline numbers with deltas and a sparkline beside each.
  • Use it for investor updates or an internal finance review, where MRR stacked by plan, the plan mix donut, an MRR movement waterfall and retention cohorts explain why revenue changed.
  • Use currency, locale and labels to render a non-US dashboard, for example amounts in euros formatted German style with translated cohort columns.
  • Skip it when you need traffic or conversion data: WebAnalyticsDashboard covers visitors and sources, and EcommerceDashboard covers orders and checkout, so use this one only for subscription metrics.
  • Pair it with DonutChart and WaterfallChart for custom panels, SegmentedControl for switching views, and AnalyticsShell with AnalyticsPanel when you adapt the layout.

Frequently asked questions

Guides that cover it

5 dashboards pages in all: browse them on All dashboards.

By Lokendra Singh Rathore (GitHub, opens in a new tab). Published , updated .