StealThis .dev
Pages Hard

Dashboard — Analytics layout (filters + grid)

A full marketing-analytics shell for the fictional Northwind Labs, built with inline-SVG charts and no libraries. A sticky sidebar and topbar frame a filter bar with a date-range segmented control plus channel and region selectors, a four-up KPI stat row with deltas and sparklines, a large area chart of the primary metric, and a grid of secondary widgets — a channel bar chart, a device donut, and a ranked landing-pages table. Changing any filter recomputes every figure and redraws all charts from a synthetic dataset with a brief loading shimmer.

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

Code

Analytics layout (filters + grid)

A production-grade analytics dashboard for the fictional Northwind Labs marketing team. A sticky left sidebar carries the section nav, a plan-usage card and the signed-in user; the topbar holds the page title, a search field and a notification bell. Below it, a filter bar combines a date-range segmented control (7d / 30d / 90d / 12m) with channel and region selectors plus Reset and Export actions. Everything is keyboard-usable, uses landmark roles and aria-pressed/aria-busy, and meets WCAG AA contrast.

The body opens with a four-up KPI row — Sessions, Revenue, Signups and Conversion rate — each showing a value, an up/down delta against the previous period, and a tiny inline-SVG sparkline. A large area chart plots the selected primary metric over the chosen range, with axis gridlines, a draw-on animation and a follow-the-cursor tooltip. The secondary grid adds an animated channel bar chart, a device-mix donut drawn from stroke-dasharray arcs, and a ranked landing-pages table with rate pills and per-row sparklines.

All numbers come from a deterministic synthetic dataset, so each filter combination is stable across redraws. Switching the date range, channel or region recomputes every KPI and redraws all charts behind a short loading shimmer; the metric toggle re-plots just the primary chart. The layout reflows from four to two to one column and the sidebar becomes an off-canvas drawer below 720px, scaling cleanly down to 360px.

Illustrative UI only — Northwind Labs is fictional and all figures are synthetic.