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.
npx shadcn@latest add https://lokendra-builds.github.io/sheenui/r/analytics-demo-product.jsonProduct usage
last 7 days
ProductDashboarduseLiveTickeruseDashboardDatadefaultProductLabels- +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.
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";
// Demo data out of the box. Plug in your own loader with `load`.
export function Analytics() {
return <ProductDashboard load={productDemoLoader} liveStep={productLiveStep} />;
}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.tsxcomponents/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.
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}
defaultRange="90d"
defaultPlatforms={["ios", "android"]}
defaultCompare
defaultLive={false}
labels={{ title: "Mobile engagement", description: "iOS and Android, against the 90 days before." }}
/>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.
import { ProductDashboard, type ProductQuery } from "@/components/sheenui/blocks/analytics-product";
// Package build (after the first npm release, or a packed tarball): import { ProductDashboard, type ProductQuery } from "@sheenui/theme";
// `load` receives { range, platforms, now, locale } and returns the data (or a promise of it).
// While it runs, the cards keep their frame and old data under a veil; if it rejects,
// the dashboard shows an error with a Retry button.
async function load(query: ProductQuery) {
const res = await fetch(`/api/analytics?range=${query.range}&platforms=${query.platforms.join(",")}`);
if (!res.ok) throw new Error(res.statusText);
return res.json();
}
<ProductDashboard load={load} defaultLive={false} labels={{ title: "Engagement from your API" }} />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
ProductLabels keys and English defaults (64)
Data: ProductData
Dashboard kit (analytics-kit.tsx)
Keyboard
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
Related pages
5 dashboards pages in all: browse them on All dashboards.
By Lokendra Singh Rathore (GitHub, opens in a new tab). Published , updated .