Ecommerce Dashboard for React
An ecommerce sales dashboard template for React with orders, top products, a conversion funnel and a regional map.
npx shadcn@latest add https://lokendra-builds.github.io/sheenui/r/analytics-demo-ecommerce.jsonE-commerce
last 7 days
EcommerceDashboardBarTrendChartdefaultEcommerceLabels- +1 more
Live demo
Filter by sales channel and the whole store re-shapes (the mobile app sells pricier baskets, social converts less). Bars grow from the baseline in a wave; Compare adds last period's revenue as a dashed line. Hover a bar to read revenue, the moving average and the change; click a category to zoom into it.
Lumen & Co.
Sales · Last 30 days
Revenue
Net sales after discounts and refunds · Last 30 days
- Revenue
- Moving average
Checkout funnel
Sessions to purchase
Sales by category
Revenue share; select a category to zoom in
Top products
By revenue
When people buy
Orders by hour and weekday
import { EcommerceDashboard } from "@/components/sheenui/blocks/analytics-ecommerce";
// Package build (after the first npm release, or a packed tarball): import { EcommerceDashboard } from "@sheenui/theme";
import { ecommerceDemoLoader, ecommerceLiveStep } from "@/components/sheenui/blocks/analytics/demo-ecommerce";
// Package build (after the first npm release, or a packed tarball): import { ecommerceDemoLoader, ecommerceLiveStep } from "@sheenui/theme/demo-data";
<EcommerceDashboard load={ecommerceDemoLoader} liveStep={ecommerceLiveStep} store="Lumen & Co." currency="USD" />Files to copy
18 folders · 51 files · 4 packages
- From
theme/src/ blocks/{analytics-ecommerce.tsx, analytics-kit.ts, icons.tsx}components/button/components/charts/{bar-list.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, combo-chart.tsx, funnel-chart.tsx, heatmap.tsx, sparkline.tsx, treemap.tsx}components/charts/chart-parts/components/charts/heatmap/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}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-ecommerce.jsonRegistry item: analytics-ecommerce. 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".
A live store, controlled
range is controlled here (the buttons above and the header stay in sync), Live and Compare start on, amounts are in pounds for en-GB. Orders land every few seconds: revenue rolls, the current hour grows and the funnel counts up.
Northwind Goods
Sales · Last 24 hours
Revenue
Net sales after discounts and refunds · Last 24 hours
- Revenue
- Moving average
- Previous period
Checkout funnel
Sessions to purchase
Sales by category
Revenue share; select a category to zoom in
Top products
By revenue
When people buy
Orders by hour and weekday
import { EcommerceDashboard } from "@/components/sheenui/blocks/analytics-ecommerce";
import { type AnalyticsRange } from "@/components/sheenui/blocks/analytics/data";
// Package build (after the first npm release, or a packed tarball): import { EcommerceDashboard, type AnalyticsRange } from "@sheenui/theme";
import { ecommerceDemoLoader, ecommerceLiveStep } from "@/components/sheenui/blocks/analytics/demo-ecommerce";
// Package build (after the first npm release, or a packed tarball): import { ecommerceDemoLoader, ecommerceLiveStep } from "@sheenui/theme/demo-data";
import { useState } from "react";
const [range, setRange] = useState<AnalyticsRange>("24h");
<EcommerceDashboard
load={ecommerceDemoLoader}
liveStep={ecommerceLiveStep}
store="Northwind Goods"
currency="GBP"
locale="en-GB"
range={range}
onRangeChange={setRange}
ranges={["24h", "7d", "30d"]}
defaultLive
defaultCompare
/>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.
Lumen & Co. (status demo)
Sales · Last 30 days
Revenue
Net sales after discounts and refunds · Last 30 days
- Revenue
- Moving average
Checkout funnel
Sessions to purchase
Sales by category
Revenue share; select a category to zoom in
Top products
By revenue
When people buy
Orders by hour and weekday
import { EcommerceDashboard } from "@/components/sheenui/blocks/analytics-ecommerce";
// Package build (after the first npm release, or a packed tarball): import { EcommerceDashboard } from "@sheenui/theme";
import { ecommerceDemoLoader, ecommerceLiveStep } from "@/components/sheenui/blocks/analytics/demo-ecommerce";
// Package build (after the first npm release, or a packed tarball): import { ecommerceDemoLoader, ecommerceLiveStep } from "@sheenui/theme/demo-data";
<EcommerceDashboard load={ecommerceDemoLoader} liveStep={ecommerceLiveStep} store="Lumen & Co." status="loading" defaultLive={false} />Data
load is required: EcommerceDashboard 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 { EcommerceDashboard } from "@/components/sheenui/blocks/analytics-ecommerce";
// Package build (after the first npm release, or a packed tarball): import { EcommerceDashboard } from "@sheenui/theme";
import { ecommerceDemoLoader, ecommerceLiveStep } from "@/components/sheenui/blocks/analytics/demo-ecommerce";
// Package build (after the first npm release, or a packed tarball): import { ecommerceDemoLoader, ecommerceLiveStep } from "@sheenui/theme/demo-data";
<EcommerceDashboard load={ecommerceDemoLoader} liveStep={ecommerceLiveStep} />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-ecommerce.json. The “component only” command under Files to copy leaves the sample data out, which is what a production build wants.
Props
EcommerceLabels keys and English defaults (49)
BarTrendChart props
AnalyticsLabels keys and English defaults (5)
EcommerceData
Keyboard
Accessibility
- The revenue chart keeps bars and the line on one axis (they share a unit); the legend names both and the Table view lists revenue and the line per period.
- The funnel reads each stage with its share of the first and of the previous stage, and how many dropped off between them.
- The heatmap is a keyboard grid with a sequential, single-hue scale and a legend; every cell reads its weekday, hour and number of orders. On phones it scrolls inside its own panel.
- Reduced motion: no grow-from-baseline, no tile glides, no pulses.
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
BarTrendChart— Bars (≤ 24px, rounded data-end, 2px gaps) with a line on the same axis and the previous period dashed.EcommerceDashboard— Props (see EcommerceDashboardProps): store ("Lumen & Co."), currency ("USD"), ranges, filters (sales-channel chips), onExport.defaultEcommerceLabels— The English EcommerceLabels used when labels is omitted; a partial labels prop is merged over them.
When to use the e-commerce dashboard
- Use it as a sales dashboard template for a store admin home screen that shows revenue, orders, average order value and conversion rate for a chosen period with rolling numbers and deltas.
- Use it for a weekly sales review where revenue bars sit beside the previous period or a moving average, with a checkout funnel from sessions to purchase and a category treemap.
- Use the filters prop for sales channels like store, marketplace, app and social, then return the matching channel data from load.
- Skip it when you sell subscriptions, where SaasRevenueDashboard handles MRR and churn, or when you only need a single tile; the stat cards block fits better for one headline number.
- Pair it with Treemap, Heatmap and FunnelChart when you build custom panels, plus Badge and Button for order status and actions around the dashboard.
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 .