Skip to content

React Web Analytics Dashboard Template

A web analytics dashboard template for React in the style of Plausible and Vercel Analytics, built from SheenUI charts. Use it as a Plausible style dashboard for a traffic screen in a SaaS app, with visitors, pageviews, bounce rate and visit duration in a KPI strip.

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

Web analytics

last 7 days

  • WebAnalyticsDashboard
  • LiveDot
  • KpiStrip
  • TrendChart
  • TrendTable
  • +16 more
  • +13 more

Live demo

Switch the range, toggle channels, pick a KPI: charts tween to the new data one after another while the frame stays put. Live is on: the online count rolls, the current day grows and the latest point pulses. Hover or arrow through the trend to read any day against the previous period.

example.com

Web analytics · Last 30 days

Unique visitors

Last 30 days

  • Unique visitors
  • Previous period

Realtime

Visitors in the last 60 seconds

Top pages

By unique visitors

Top referrers

Where visitors came from

Devices

Share of visitors

Countries

Unique visitors by country

Files to copy

23 folders · 55 files · 4 packages
From theme/src/
  • blocks/{analytics-web.tsx, analytics-kit.ts, icons.tsx}
  • components/button/
  • components/charts/{bar-list.tsx, category-bar.tsx, chart-export-menu.tsx, chart-export.ts, chart-figure.tsx, chart-fit.tsx, chart-icons.tsx, chart-parts.tsx, chart-patterns.tsx, chart-pointer.tsx, chart-tip.tsx, chart-utils.ts, donut-chart.tsx, geo-map.tsx, heatmap.tsx, pie-chart.tsx, sparkline.tsx, streamgraph.tsx, streaming-chart.tsx}
  • components/charts/category-bar/
  • components/charts/chart-parts/
  • components/charts/geo-map/
  • components/charts/geo/
  • components/charts/heatmap/
  • components/charts/streamgraph/
  • components/charts/streaming-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}
  • 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-web.jsonRegistry item: analytics-web. 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".

Your data, your language

load() receives the range, the active filters and an abort signal; return the data (or a promise). This preview stands in for an API with a 900 ms delay, formats everything for de-DE and translates the labels.

docs.example.com

Webanalyse · Letzte 7 Tage

Seitenaufrufe

Letzte 7 Tage

  • Seitenaufrufe
  • Vorzeitraum

Echtzeit

Besucher der letzten 60 Sekunden

Top-Seiten

Nach Besuchern

Top-Verweise

Woher die Besucher kamen

Geräte

Anteil der Besucher

Länder

Besucher nach Land

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.

staging.example.com

Web analytics · Last 30 days

Unique visitors

Last 30 days

  • Unique visitors
  • Previous period

Realtime

Visitors in the last 60 seconds

Top pages

By unique visitors

Top referrers

Where visitors came from

Devices

Share of visitors

Countries

Unique visitors by country

Data

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

<WebAnalyticsDashboard load={webAnalyticsDemoLoader} liveStep={webLiveStep} />

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-web.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<WebAnalyticsData>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: WebAnalyticsData, tick: number) => WebAnalyticsData)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.
sitestring"example.com"Site shown as the title (string, default "example.com").
rangesreadonly AnalyticsRange[]all fiveRanges offered in the header (readonly AnalyticsRange[], default all five).
filtersreadonly AnalyticsFilter[]the five web channelsChannel filter chips. Their values reach load as filters.
metricWebMetricNoneMetric shown by the trend chart (the selected KPI tab).
defaultMetricWebMetric"visitors"The metric shown first when metric is not controlled (WebMetric, default "visitors").
onMetricChange((metric: WebMetric) => void)NoneCalled when another KPI tab is picked.
onExport((data: WebAnalyticsData) => void)downloads a CSV of the time seriesCalled by Export (default: downloads a CSV of the time series).
headingLevelHeadingLevelOption2Heading level of the title (1 to 6), or "none" for a paragraph with no heading role (panel titles follow).
nowDatethe current timeWhere the realtime chart's history starts (Date, default: the current time). On a prerendered page pass a fixed date, so the server's and the browser's first render print the same axis.
localestringthe runtime'sBCP 47 locale for every number and date (string, default the runtime's).
labelsPartial<WebAnalyticsLabels>defaultWebAnalyticsLabelsEvery other string, for translation: labels={{ range: "…" }}; omitted keys keep the English of defaultWebAnalyticsLabels. All 53 keys of WebAnalyticsLabels are listed in the key table under the props table.
classNamestringNoneAdds extra classes to the root <section> (string).
WebAnalyticsLabels keys and English defaults (53)
Pass any key in labels; the rest keep the defaults of defaultWebAnalyticsLabels.
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 channel
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: choose what the chart shows
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) => `Web analytics · ${range}`
metrics{ visitors: "Unique visitors", pageviews: "Pageviews", bounceRate: "Bounce rate", duration: "Visit duration...
onlineonline
realtimeRealtime
realtimeDescriptionVisitors in the last 60 seconds
visitorsNowvisitors right now
activePagesActive pages
topPagesTop pages
topPagesDescriptionBy unique visitors
pagePage
referrersTop referrers
referrersDescriptionWhere visitors came from
sourceSource
countriesCountries
countriesDescriptionUnique visitors by country
devicesDevices
devicesDescriptionShare of visitors
browsersBrowsers
browserBrowser
onlineSeriesVisitors online
deviceNames{ desktop: "Desktop", mobile: "Mobile", tablet: "Tablet" }
channels{ direct: "Direct", organic: "Organic search", referral: "Referral", social: "Social", email: "Email" }
dateDate
formatDuration(seconds) => { const s = Math.max(0, Math.round(seconds)); const m = Math.floor(s / 60); return m > 0 ? `${...

WebAnalyticsData

PropTypeDefaultDescription
points{ label, long?, current, previous? }[]NoneOne row per hour / day / month; current and previous hold visitors, pageviews, bounceRate (0–1) and duration (seconds).
totals / previousTotalsRecord<WebMetric, number>NoneHeadline numbers for the range (rates and durations are averages).
pages / referrers / browsers{ name, value, href?, icon? }[]NoneEach one is a bar list of BarListItem rows.
countries{ id, value }[]NoneVisitors by ISO 3166-1 code (alpha-2, alpha-3 or numeric).
devices{ device: "desktop" | "mobile" | "tablet", value }[]NoneFills the donut chart with one value per device type.
realtime{ visitors, pages }NoneVisitors on the site right now and the pages they're on.

AnalyticsShell props

PropTypeDefaultDescription
title (required)ReactNodeNoneThe dashboard's title (ReactNode, required), rendered as the heading headingLevel.
subtitleReactNodeNoneShows a line under the title (ReactNode).
iconReactNodeNoneA small mark before the title.
statusReactNodeNoneShown beside the title (e.g. a live visitors pill).
headingId (required)stringNoneThe id of the title heading (string, required): the section is aria-labelledby it.
headingLevelHeadingLevelOption2Heading level of the dashboard title (1 to 6), to fit the page outline, or "none" for a paragraph with no heading role (panel titles follow).
range (required)AnalyticsRangeNoneSets the selected range (AnalyticsRange, required).
onRangeChange (required)(range: AnalyticsRange) => voidNoneCalled when another range is picked (required).
rangesreadonly AnalyticsRange[]ANALYTICS_RANGESThe ranges offered (readonly AnalyticsRange[], default all five: 24h, 7d, 30d, 90d, 12m).
filtersreadonly AnalyticsFilter[]NoneFilter chips shown next to the range control; none when omitted or empty.
activeFilters (required)readonly string[]NoneThe values of the chips that are on (required).
onFiltersChange (required)(filters: string[]) => voidNoneCalled with the new list of active chip values (required).
live (required)booleanNoneWhether live updates run (required); the Live toggle must stay (WCAG 2.2.2).
onLiveChange (required)(live: boolean) => voidNoneCalled when the Live toggle is pressed (required).
compare (required)booleanNoneWhether the previous period is drawn (required).
onCompareChange (required)(compare: boolean) => voidNoneCalled when the Compare toggle is pressed (required).
onExport(() => void)NoneCalled by the Export button. Omit to hide it.
exportDisabledbooleanfalseKeep Export disabled (boolean, default false), e.g. until the first data arrives: the button is always there, so the toolbar never shifts.
loadingbooleanfalseNew data is on its way (boolean, default false): panels dim and scan, aria-busy is set, and "Loading" / "Updated" are announced once each.
glassAnalyticsGlass"auto"Glass on the panels: "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.
backdropbooleantrueDraws a soft colour light behind the dashboard.
labels (required)AnalyticsLabelsdefaultAnalyticsLabelsEvery string of the shell and its panels (AnalyticsLabels, required): start from defaultAnalyticsLabels. Spread defaultAnalyticsLabels and override single keys, e.g. labels={{ ...defaultAnalyticsLabels, range: "…" }}. All 29 keys of AnalyticsLabels are listed in the key table under the props table.
children (required)ReactNodeNoneThe dashboard body, usually an AnalyticsGrid of AnalyticsPanels.
classNamestringNoneAdds extra classes to the root <section> (string).
AnalyticsLabels keys and English defaults (29)
Spread defaultAnalyticsLabels and override single keys in labels.
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.

AnalyticsState props

PropTypeDefaultDescription
kind (required)"error" | "empty"None"empty" when the query returned nothing, "error" when loading failed (it then offers Retry).
labels (required)AnalyticsLabelsdefaultAnalyticsLabelsThe dashboard's strings (the state's title, description and Retry label). Spread defaultAnalyticsLabels and override single keys, e.g. labels={{ ...defaultAnalyticsLabels, range: "…" }}. All 29 keys of AnalyticsLabels are listed in the key table under the props table.
onRetry(() => void)NoneCalled by the Retry button of the error state. Without it no Retry button shows.

LiveDot props

PropTypeDefaultDescription
on (required)booleanNoneWhether the dot pulses: true while live updates are running.

PanelSkeleton props

PropTypeDefaultDescription
height (required)numberNoneHeight of the placeholder in px, matching the panel body it stands in for.
pulsebooleantrueSweep a light band across the placeholder while it is on screen.

TrendTable props

PropTypeDefaultDescription
data (required)TrendDatum[]NoneThe time series to list: one object per point, with the current and optional previous value of each series.
seriesLabel (required)stringNoneHeader of the value column, for example "Visitors".
comparebooleanNoneAdd a previous-period column and a change column.
format((n: number) => string)formatCompactFormats each number in the table.
indexLabel (required)stringNoneHeader of the first column, for example "Day".
localestringthe runtime's localeBCP 47 locale for dates and numbers; defaults to the runtime's locale.
labelsPartial<Pick<AnalyticsLabels, "noData" | "previousPeriod" | "changeLabel">>defaultAnalyticsLabelsEvery other string, for translation: labels={{ previousPeriod: "…" }}; omitted keys keep the English of defaultAnalyticsLabels. All 3 keys of AnalyticsLabels are listed in the key table under the props table.
captionstringNoneVisually hidden caption that names the table and its scroll region.

Build your own dashboard

The templates are made from analytics-kit.tsx: copy one template and swap its panels, or compose a new one from the same parts.

useAnalyticsDashboard(props, options)

PropTypeDefaultDescription
options.loadAnalyticsLoader<T>NoneThe loader to use when the props have none.
options.liveStep(prev: T, tick: number) => TNoneApplies one simulated live update (omit for no live mode).
options.defaults{ range, live, compare }NoneSets the starting state when uncontrolled.
options.isEmpty(data: T) => booleanNoneWhen to show the empty state.
returns{ data, query, status, ready, busy, range, setRange, filters, setFilters, live, setLive, compare, setCompare, running, retry, rootRef }NoneEverything a template wires into AnalyticsShell and its panels; attach rootRef to the root (live updates pause when it's off-screen).

AnalyticsPanel

PropTypeDefaultDescription
title (required)stringNoneThe panel's heading (string, required); it also names the chart / table views.
descriptionReactNodeNoneA line under the title (ReactNode): what is shown, its unit.
asideReactNodeNoneTop right, before the Chart / Table switch (a headline number, a small control).
legendPanelLegendItem[]NoneLegend under the header (two or more series only). kind: "dashed" keys a dashed line.
tableReactNodeNoneThe table view of the chart. When given, the panel gets a Chart / Table switch.
spanPanelSpanone column everywhereColumns the panel spans (PanelSpan, default one column everywhere): md in the 2-column layout, lg in the 4-column one.
minHeight (required)numberNoneHeight reserved for the body before its chart mounts, so nothing shifts.
ready (required)booleanNoneData is present. While false the body is a skeleton.
indexnumberNoneEntrance order (staggered, at most 400 ms across the dashboard).
countnumberNoneHow many panels share the entrance (for the stagger budget).
idstringNoneid of the panel's root (e.g. for aria-controls).
depsreadonly unknown[]NoneWhat the chart depends on. With it, the chart re-renders only when one of these changes (not when the panel turns busy), and a change lands one frame after the panel before it: new data ripples across the dashboard instead of landing in one long task.
labels (required)Pick<AnalyticsLabels, "table" | "chart" | "viewAs">defaultAnalyticsLabelsStrings of the Chart / Table switch (Pick<AnalyticsLabels, "chart" | "table" | "viewAs">, required). Spread defaultAnalyticsLabels and override single keys, e.g. labels={{ ...defaultAnalyticsLabels, chart: "…" }}. All 3 keys of AnalyticsLabels are listed in the key table under the props table.
children (required)ReactNode | (() => ReactNode)NoneThe chart. A function is only called once the panel is near the viewport.
classNamestringNoneAdds extra classes to the glass card (string).
bodyClassNamestringNoneClasses for the body under the header (string).

KpiStrip

PropTypeDefaultDescription
items (required)KpiItem[] | nullNoneShows skeleton cells while null (no data yet).
comparebooleanfalseShow the previous value under each number.
selectedstringNoneTurns the strip into tabs that pick what controls (a chart panel) shows.
onSelect((id: string) => void)NoneCalled with the chosen KPI's id when the strip works as tabs (together with selected).
controlsstringNoneSets the id of the element the tabs control.
localestringthe runtime'sBCP 47 locale for the figures (string, default the runtime's).
loadingbooleanfalseNo data yet: skeleton cells (same as items: null).
busybooleanfalseNew data on its way: the figures dim. (Inside an AnalyticsShell its loading does this already.)
labelsPick<AnalyticsLabels, "change" | "noChange" | "vsPrevious" | "kpis">defaultAnalyticsLabelsSpread defaultAnalyticsLabels and override single keys, e.g. labels={{ ...defaultAnalyticsLabels, change: "…" }}. All 4 keys of AnalyticsLabels are listed in the key table under the props table.
aria-labelstringlabels.kpisSets the accessible name of the KPI strip.
classNamestringNoneAdds extra classes to the strip (string).
cellClassNamestringNoneExtra classes for every cell, skeleton or loaded. Give them a min-h-[…] per container width (@lg:min-h-[…]) equal to the loaded row height so the strip keeps its size when the figures arrive.

TrendChart · StackedTrendChart · BarTrendChart

PropTypeDefaultDescription
data (required)TrendDatum[]NoneThe points, oldest first (TrendDatum[], required).
seriesLabel (required)stringNoneSets the name of the series (tooltip, table).
colorChartColor1Palette slot (1–8) of the series line and its area.
comparebooleanfalseDraw the previous period as a dashed, muted line.
livebooleanfalsePulse the latest point (live data).
heightnumber280Sets the plot height in pixels (number, default 280).
format((n: number) => string)formatCompactFormats values in the axis and tooltip ((n: number) => string, default compact: 12.8K).
localestringthe runtime'sBCP 47 locale for dates and numbers in announcements (string, default the runtime's).
labelsPartial<Pick<AnalyticsLabels, "noData" | "previousPeriod" | "changeLabel" | "chartInstructions" | "touchHint">>defaultAnalyticsLabelsEvery other string, for translation: labels={{ previousPeriod: "…" }}; omitted keys keep the English of defaultAnalyticsLabels. All 5 keys of AnalyticsLabels are listed in the key table under the props table.
aria-label (required)stringNoneNames the chart for assistive tech (string, required).
classNamestringNoneAdds extra classes to the chart's wrapper (string).
series (required)StackedTrendSeries[]NoneBands from the bottom of the stack up, each with a fixed colour slot.
lineLabelstringNoneName of the line series (omit to hide the line).
lineColorChartColor2Sets the palette slot (1–8) used for the line.

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).

Accessibility

  • The dashboard is a labeled region (its title); panels are sections named by their headings; loading sets aria-busy and is announced once (“Loading new data…”, then “Dashboard updated”), never on every live tick.
  • The KPI strip is a real tablist that controls the trend panel: “Unique visitors, tab, selected, 1 of 4”. Each delta reads in words (“Up 12.3% vs previous period”), with an arrow and a sign, so color is never the only signal.
  • Rolling numbers are visual only: screen readers get the final value once. The online pill doesn't announce every change.
  • Every chart has a Table view with the same numbers; charts are focusable and read point by point with the arrow keys (announced politely).
  • Live and Compare are toggle buttons (aria-pressed) with descriptions; filter chips show a ✓ and are underlined in forced colors when pressed.
  • Reduced motion: no draw-ins, glides, pulses or scans; numbers and charts jump to their values, fades stay short.

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

  • AnalyticsGrid — 1 column below 42rem of container width, 2 up to 64rem, then 4.
  • AnalyticsPanel — A glass card for one chart.
  • AnalyticsShell — The frame of a dashboard: a container-query root (the grid adapts to the space it gets, not to the window) with a glass header.
  • AnalyticsState — Whole-dashboard state under the header: no data, or the loader failed (with Retry).
  • DashboardBackdrop — Soft, static colour light behind a dashboard so its glass always has something to refract.
  • KpiStrip — One glass strip, four cells (2×2 on phones), hairlines between them.
  • LiveDot — The live indicator: a ring that pings while live (paused off-screen and in hidden tabs).
  • PanelSkeleton — Placeholder body: faint bars where the chart will be (opacity pulse only; still under reduced motion).
  • StackedTrendChart — Stacked areas (e.g.
  • TrendChart — The hero chart of a dashboard: gradient area, 2px line, dashed previous period.
  • TrendTable — Table view of a TrendChart.
  • WebAnalyticsDashboard — Props (see WebAnalyticsDashboardProps): site ("example.com"), ranges, filters (the five web channels).
  • defaultAnalyticsLabels — The English AnalyticsLabels every dashboard starts from; spread it and override the strings you translate.
  • defaultStackedTrendChartLabels — The English strings of StackedTrendChart; spread it into your own labels and change what you need.
  • defaultWebAnalyticsLabels — The English WebAnalyticsLabels used when labels is omitted; a partial labels prop is merged over them.
  • trendLegend — Legend items for a trend chart (series + dashed previous period when comparing).
  • useAdaptiveGlass — Glass budget for a whole dashboard.
  • useAnalyticsDashboard — Wires a dashboard: controllable range / filters / live / compare, the loader.

When to use the web analytics dashboard

  • Use it for the traffic or site-stats screen of a SaaS app, where a strip of KPI tiles (visitors, pageviews, bounce rate, visit duration) sits above the charts that explain them.
  • Use it for a client-facing site report where the trend chart shows the previous period dashed, a realtime panel streams the current visitors and active pages, while top pages, referrers, devices and a country map sit below.
  • Connect it to your own API through load, which receives the range, the active filters and an abort signal, then set locale and labels to translate every number and string.
  • Skip it when you need funnels and retention, or revenue figures: ProductDashboard covers user journeys and cohorts, and SaasRevenueDashboard handles MRR and churn, so pick the block that matches your data.
  • Pair it with SegmentedControl for your own filters beside it, Switch for toggles in surrounding settings, and useAnalyticsDashboard if you build a custom dashboard from the same kit.

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 .