StealThis .dev
Pages Medium

Dashboard — Tabbed / sectioned

A sectioned analytics dashboard that splits dense reporting into Overview, Traffic, Revenue, and Users tabs behind a persistent header and sidebar. Built on the WAI-ARIA tabs pattern with arrow-key roving focus, an animated underline that tracks the active tab, and a soft fade between panels. Each section lazy-renders its own widget set with a shimmer placeholder the first time, remembers the last tab, ticks live KPIs, filters by date range, and lets you drag KPI cards to rearrange.

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

Code

Tabbed / sectioned

A product-style analytics dashboard for the fictional Northwind workspace. A fixed sidebar and a persistent top header (title, date-range segmented control, live toggle, and avatar) stay put while a tab bar — Overview, Traffic, Revenue, Users — swaps the body below. Each section carries its own KPI cards with deltas and sparklines plus larger widgets: an inline SVG/CSS bar chart of revenue versus target, a CSS donut for channel mix, a line chart, ranked horizontal bars, and a status table. All charts are hand-rolled SVG and CSS — no chart libraries, no images, no canvas.

Tabs follow the WAI-ARIA tabs pattern: role="tablist"/tab/tabpanel, aria-selected, roving tabindex, and Left/Right/Up/Down/Home/End keyboard navigation. Selecting a tab fades its panel in and slides an underline to match. The first three sections are empty in markup and are built on demand — a shimmer skeleton shows for a beat, then the real widgets render and animate in, so the page stays light until you actually open a section. The last opened tab is saved to localStorage and restored on reload.

Interactions are wired and functional: the date-range control rescales every KPI value, the live toggle ticks active-panel metrics with small realistic drifts, KPI cards are draggable to rearrange within their grid, the widget menus and range changes raise a toast, and the sidebar collapses to an off-canvas drawer under ~720px. The responsive 12-column grid folds to two columns and then one as the viewport narrows, and a prefers-reduced-motion block disables the animations.