StealThis .dev
Pages Hard

Shop — Store Dashboard

A merchant store dashboard for the fictional Lumen Goods shop, built as a single self-contained page. Four KPI cards show net sales, orders, average order value and conversion with up or down deltas and inline SVG sparklines. An animated revenue area chart with a previous-period overlay sits beside an orders-by-status donut, a sortable top-products table, a low-stock reorder list and a live recent-orders feed. A period switcher recomputes every metric and redraws all charts.

Open in Lab
html css vanilla-js
Targets: JS HTML

Code

Store Dashboard

A merchant control center for the fictional Lumen Goods store. A dark admin sidebar carries the brand, primary navigation and a store-status card, while the main column opens with four KPI cards — net sales, orders, average order value and conversion — each pairing a big value with a colored up/down delta chip and a tiny inline-SVG sparkline. Below sit the two hero charts: an animated revenue area/line chart with a dashed previous-period overlay, and an orders-by-status donut with a percentage legend. A sortable top-products table, a low-stock reorder list and a live recent-orders feed fill out the grid.

Everything is driven by the segmented 7d / 30d / 90d / 12m period switch in the top bar. Picking a period deterministically rebuilds the revenue series and recomputes all four KPIs, their deltas and sparklines, redraws the revenue chart (with a stroke-draw animation) and the donut, and rescales the product table and feed. The revenue chart tracks the pointer with a crosshair rule, a marker dot and a tooltip showing the exact figure for the nearest day, week or month. Table headers sort by product, units, revenue or margin and toggle ascending/descending, and each low-stock row has a working Reorder button that confirms with a toast.

The layout is a CSS grid that collapses from four KPI columns to two to one and stacks the chart panels as the viewport narrows; below ~860px the sidebar becomes an off-canvas drawer behind a scrim, toggled by a hamburger button. All charts are hand-built inline SVG — no libraries, no images, no external requests beyond the Google Fonts link — and the whole screen reflows cleanly down to about 360px with visible focus rings on every control.

Illustrative storefront UI only — fictional products, prices, and reviews. No real checkout.