Skip to content

React Product Analytics Dashboard

A product analytics dashboard for React with funnels, retention cohorts and Sankey user flows. Use it as a funnel and retention dashboard for a product analytics screen that tracks daily, weekly and monthly active users and stickiness (DAU divided by MAU) for web, iOS and Android.

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

Product usage

last 7 days

  • ProductDashboard
  • useLiveTicker
  • useDashboardData
  • defaultProductLabels
  • +2 more

Live dashboard

Switch the range or tap a platform chip: old data stays under a soft veil, then every card tweens to the new numbers, one after another. Live mode drifts the figures every two seconds with rolling digits (it pauses when scrolled away).

Engagement overview

Who's active, how they found you, where they drop off and what keeps them coming back.

User journey

From first visit through onboarding to activation. Hover or tap a step to trace it.

Activation funnel

Visitors who reached each step.

Feature adoption

Share of active users who used each feature.

Retention

Users still active, by the week they signed up.

Event volume

Tracked events per day over the last 12 months.

Files to copy

20 folders · 54 files · 4 packages
From theme/src/
  • blocks/{analytics-product.tsx, analytics-kit.ts, icons.tsx}
  • components/button/
  • components/charts/{bar-list.tsx, calendar-heatmap.tsx, 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, flow-utils.tsx, funnel-chart.tsx, heatmap.tsx, sankey-chart.tsx, sparkline.tsx}
  • components/charts/chart-parts/
  • components/charts/cohort-chart/
  • components/charts/heatmap/
  • components/charts/sankey-chart/
  • 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, use-resolved-scheme.ts}
  • motion/{beat.ts, gate.ts, tokens.ts}
  • lib/{cn.ts, csv.ts, form.ts, glide-highlight.tsx, heading.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-product.jsonRegistry item: analytics-product. 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".

Compare with the previous period

Pre-set the range, filters and Compare. Every KPI shows its previous value, the funnel shows the change in conversion.

Mobile engagement

iOS and Android, against the 90 days before.

User journey

From first visit through onboarding to activation. Hover or tap a step to trace it.

Activation funnel

Visitors who reached each step.

Feature adoption

Share of active users who used each feature.

Retention

Users still active, by the week they signed up.

Event volume

Tracked events per day over the last 12 months.

Loading, empty and error states

Bring your own data with `load`. Try a slow network (skeletons, then the veil on later changes), an empty account and a failed request.

Engagement from your API

Who's active, how they found you, where they drop off and what keeps them coming back.

User journey

From first visit through onboarding to activation. Hover or tap a step to trace it.

Activation funnel

Visitors who reached each step.

Feature adoption

Share of active users who used each feature.

Retention

Users still active, by the week they signed up.

Event volume

Tracked events per day over the last 12 months.

Data

load is required: ProductDashboard 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 { ProductDashboard } from "@/components/sheenui/blocks/analytics-product";
// Package build (after the first npm release, or a packed tarball): import { ProductDashboard } from "@sheenui/theme";
import { productDemoLoader, productLiveStep } from "@/components/sheenui/blocks/analytics/demo-product";
// Package build (after the first npm release, or a packed tarball): import { productDemoLoader, productLiveStep } from "@sheenui/theme/demo-data";

<ProductDashboard load={productDemoLoader} liveStep={productLiveStep} />

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-product.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)(query: ProductQuery, signal: AbortSignal) => ProductData | Promise<ProductData>NoneLoads the data for a query: return it, or a promise of it. Required: there is no built-in demo data (see @sheenui/theme/demo-data).
statusAnalyticsStatus"auto"Force a state for demos and tests: "loading", "empty" or "error". "auto" (default) follows the data.
liveStep((data: ProductData, tick: number) => ProductData) | nullnullEvolves the data while Live is on.
liveIntervalnumber2000Milliseconds between live updates.
rangeAnalyticsRangeNoneSets the active range when controlled.
defaultRangeAnalyticsRange"30d"The range at first when range is not controlled (AnalyticsRange, default "30d").
onRangeChange((range: AnalyticsRange) => void)NoneCalled when the range changes.
platformsProductPlatform[]NoneThe platform chips that are on (controlled); none selected means all platforms.
defaultPlatformsProductPlatform[][]The platforms on at first when platforms is not controlled (default none, i.e. all).
onPlatformsChange((platforms: ProductPlatform[]) => void)NoneCalled when the platform chips change.
livebooleanNoneWhether live updates run (controlled).
defaultLivebooleantrueWhether live updates are on at first (boolean, default true).
onLiveChange((live: boolean) => void)NoneCalled when the Live toggle changes.
comparebooleanNoneWhether the previous period is shown (controlled).
defaultComparebooleanfalseWhether the comparison is on at first (boolean, default false).
onCompareChange((compare: boolean) => void)NoneCalled when the Compare toggle changes.
onExport((data: ProductData, query: ProductQuery) => void)downloads the figures as CSVCalled by the Export button.
nowDatethe current date"Now" for the date axes. On a prerendered page pass a fixed date, so the server's and the browser's first render print the same axes.
localestringthe runtime'sBCP 47 locale for every number and date (string, default the runtime's).
headingLevelHeadingLevelOption2Heading level of the title (1 to 6, default 2), or "none" for a paragraph with no heading role (panel titles follow).
glassAnalyticsGlass"auto"Glass on the cards: "auto" (default) keeps real glass while the device keeps up and falls back to a frosted solid surface on weak devices or when frames drop; "full" / "flat" force one.
labelsPartial<ProductLabels>defaultProductLabelsEvery other string, for translation: labels={{ range: "…" }}; omitted keys keep the English of defaultProductLabels. All 64 keys of ProductLabels are listed in the key table under the props table.
classNamestringNoneAdds extra classes to the root <section> (string).
ProductLabels keys and English defaults (64)
Pass any key in labels; the rest keep the defaults of defaultProductLabels.
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...
filtersFilters
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
kpisKey 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.
eyebrowProduct analytics
titleEngagement overview
descriptionWho's active, how they found you, where they drop off and what keeps them coming back.
platformPlatform
platforms{ web: "Web", ios: "iOS", android: "Android" }
dauDaily active users
dauHintDAU · average per day
wauWeekly active users
wauHintWAU · rolling 7 days
mauMonthly active users
mauHintMAU · rolling 30 days
stickinessStickiness
stickinessHintDAU ÷ MAU
eventsPerMinute(value) => <>{value} events/min</>
flowTitleUser journey
flowDescriptionFrom first visit through onboarding to activation. Hover or tap a step to trace it.
signups(value) => `${value} sign-ups`
funnelTitleActivation funnel
funnelDescriptionVisitors who reached each step.
converted(percent) => `${percent} activated`
adoptionTitleFeature adoption
adoptionDescriptionShare of active users who used each feature.
featureFeature
usersActive users
retentionTitleRetention
retentionDescription(unit) => `Users still active, by the ${unit} they signed up.`
periodWeek(i) => `Week ${i}`
periodMonth(i) => `Month ${i}`
eventsTitleEvent volume
eventsDescriptionTracked events per day over the last 12 months.
eventsUnitevents
eventsTotal(value, range) => `${value} events · ${range.toLowerCase()}`
featuresPerUserFeatures per active user
mostUsedMost used
exportFileproduct-analytics

Data: ProductData

PropTypeDefaultDescription
dau / wau / mau{ value: number; previous: number; trend: number[] }NoneActive users now, in the previous period and along the range (oldest first). Stickiness is DAU ÷ MAU.
flow{ nodes: SankeyNode[]; links: SankeyLink[] }NoneThe user journey for the sankey (sources → sign-up → onboarding → outcome).
funnel / funnelPreviousFunnelStage[]NoneActivation funnel stages for this and the previous period.
adoptionBarListItem[]NoneSets the share of active users (0–100) per feature.
cohorts / cohortUnitCohortRow[] / "week" | "month"NoneRetention cohorts as user counts per period.
events / eventsStart / eventsEndCalendarDatum[] / ISO datesNoneEvents per day for the calendar heatmap and the days it shows.
eventsPerMinutenumberNoneShown beside the Live pill.

Dashboard kit (analytics-kit.tsx)

PropTypeDefaultDescription
AnalyticsShellcomponentNoneThe frame: a container-query root with the glass header (title, status pill, time-range control, filter chips, Live and Compare toggles, Export), loading announcements and the adaptive glass budget.
AnalyticsGridcomponentNoneContainer-query grid: 1 column under 42rem, 2 up to 64rem, 4 above. Give each panel a span so rows always fill.
AnalyticsPanelcomponentNoneGlass panel: header, Chart / Table tabs, a body that mounts near the viewport, a skeleton until ready and a dim veil (not a flash) while new data loads.
AnalyticsStatecomponentNoneThe empty and error states (with Retry), at the panel heading level.
KpiStripcomponentNoneKPI cells in one glass strip: rolling numbers, change badges with arrows, sparklines and previous-period figures. With onSelect it is a tablist that drives a chart.
RollingNumber / DeltaBadgecomponentNoneAn odometer number (one CSS transform per digit) and an up / down badge with an arrow and a signed number (color is never the only signal).
useDashboardData(load, query, key)hookNoneLoads data (sync or a promise), keeps the old data on screen while the next arrives, drops stale responses, retries, and updates in place for live mode.
useLiveTicker(enabled, onTick, { ref, interval })hookNoneAn interval that only runs while ref is on screen and the tab is visible.
useCascade(value, index)hookNoneHands new data to panel number index a beat after the previous one: a visible cascade, and no single long render task.
useAdaptiveGlass(ref, mode)hookNoneThe glass budget behind the glass prop: flat panels on weak devices, with lite glass, or once frames drop.

Keyboard

KeysAction
TabMoves through Live, Compare, Export, the time range and the filter chips, then each panel's Chart / Table tabs and chart.
←/→In the time range: picks the previous / next range.
Enter/SpaceToggles a filter chip, Live or Compare, presses Export, or picks the Chart / Table view.
Arrow keysInside a chart: read its values (sankey: walk the flows; funnel: stages; cohort: cells; calendar: days).
EscapeClears the value being read.

Accessibility

  • The dashboard is a labeled region; a polite live region says “Loading new data…” and “Dashboard updated” when you change the range or filters, and “CSV downloaded” after an export (never on live ticks).
  • Every chart has a table view behind its Chart / Table tabs, so every value can be read without color or a pointer.
  • Change badges carry an arrow and a signed number, and a screen-reader sentence (“Up 12.4% vs previous period”); green never stands alone.
  • Rolling numbers are visual only: the final value is in the text for assistive tech, and live ticks are not announced (no chatter every two seconds).
  • Live updates stop on their own off-screen and in background tabs; the Live toggle is the pause control (WCAG 2.2.2).
  • Reduced motion: no rolling, no draw-in, no panel rise; values and data changes appear at once (short fades only).
  • Filter chips, Live and Compare are toggle buttons (aria-pressed) with a check mark or dot when on; every control has a 44px hit area on touch screens.

Performance

  • Glass budget: only the header, the KPI strip, the cards and one tooltip blur what is behind them; controls inside them drop their own blur.
  • Charts below the fold mount only when they come near the viewport; live updates and loops pause off-screen and in hidden tabs.
  • New data reaches the cards one after another, inside React transitions, so no single task re-renders every chart. Live ticks re-render the KPI strip only.

All exports on this page

  • ProductDashboard — A full product-analytics dashboard: active users and stickiness, the sign-up journey (sankey), the activation funnel, feature adoption.
  • defaultProductLabels — The English ProductLabels used when labels is omitted; a partial labels prop is merged over them.
  • useDashboardData — The one data-loading hook of every dashboard.
  • useLiveTicker — Calls onTick every interval ms while enabled, but only while ref is on screen and the tab is visible.

When to use the product analytics dashboard

  • Use it for a product team's weekly review, where the funnel, the retention cohorts and the Sankey user flows show where people drop off, and daily, weekly and monthly active users show whether they come back across web, iOS and Android.
  • Use it for a growth review, where a sankey shows how sign-ups flow from sources to onboarding and outcomes, an activation funnel shows drop-off, and cohorts show retention.
  • Use platforms chips to filter by web, iOS and Android, and Compare to show the previous period beside every figure and the funnel's conversion.
  • Skip it when you need revenue metrics or site traffic: SaasRevenueDashboard covers MRR and churn, and WebAnalyticsDashboard covers page views and referrers, so use this one for in-product behavior.
  • Pair it with SankeyChart, FunnelChart and CohortChart when assembling custom panels, and useDashboardData with useLiveTicker if you build your own live panels.

Frequently asked questions

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

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