Metrics dashboard
ProA complete product analytics app on the screen shell, with sites, saved views, a date range and filters. It has KPI tabs over one chart you can drag to zoom, breakdowns by page, source, location and device, goals, sortable tables, and a detail panel for any row.
- A full analytics product screen: KPIs over one chart, top pages, sources, locations, devices and goals, with a date range, filters and saved views.
- Product, marketing or docs analytics where people move between an overview and a table per dimension, and open any row for detail.
- Use metric-explorer or revenue-explorer for one explorable chart inside an existing page.
- Use stat-card for a single number and sparkline for inline trends in a table.
- Use screen-shell directly when you need the frame for a different kind of app.
Installation
Pro source and install commands unlock with a Pro plan.
Usage
Use this to make a small set of key measures explorable. Replace the sample figures with your analytics source.
import { MetricsDashboard } from "@/components/arc/blocks/metrics-dashboard/metrics-dashboard"; export function AnalyticsPage() { return ( <div style={{ height: "100dvh" }}> <MetricsDashboard defaultRange="30d" /> </div> );}MetricsDashboard
A complete product analytics screen built on screen-shell. Sites live in the workspace switcher under Halden's wedge mark, each in its own tone. The sidebar holds saved views as rows (a glyph for what each one filters and its range) and a realtime footer with the online count and the last 30 minutes by minute. The header has a date range menu and a CSV export. The overview pairs five KPI tabs with one chart (hover or arrow keys to inspect, drag or Shift with the arrows to zoom, a Compare switch for the previous period), breakdown cards for pages, sources, locations and devices, and goals. Each nav item opens a sortable, searchable table, and any row opens a floating detail panel with its trend, stats, a related breakdown and a filter action. All figures are sample data for a fictional site, halden.io, ending 11 Nov 2026.
defaultSite"web" | "docs" | "status""web"The site the screen opens on: halden.io, docs.halden.io or status.halden.io.defaultRange"7d" | "30d" | "90d" | "mtd" | "lastMonth""30d"The starting date range.defaultMetric"visitors" | "pageviews" | "signups" | "bounce" | "duration""visitors"The KPI the main chart starts on.classNamestring–Class on the outer wrapper. The screen fills its parent's height (at least 640px), so give the parent a height.- ⌘K, Ctrl+K
- Focuses the sidebar search (from screen-shell).
- ArrowLeftorArrowRight
- On the KPI tabs, moves to the next metric and charts it; the highlight lands instantly. On the focused chart, inspects the previous or next day.
- Shift+ArrowLeftorArrowRight, then Enter
- Selects a span of days on the chart and zooms into it. Escape clears the selection.
- ArrowUporArrowDown, Home, End
- Move between rows in a breakdown card or table, and between items in the date range menu (Arc's dropdown menu) and the filter list.
- ArrowLeftorArrowRight on a card switcher
- Moves between the views of a breakdown card, such as Top pages and Entry pages (Arc's segmented control).
- Enter
- On a row, opens its detail panel and moves focus to its close button. In the filter search, applies the highlighted value.
- Escape
- Closes the date range menu, the filter popover or the detail panel, and returns focus to what opened it.
- KPIs are a tablist with aria-selected and roving tabindex; the chart is their tabpanel, role="img" with instructions, and the inspected day is announced through a status region.
- The date range is Arc's dropdown menu with a check on the current range; the filter popover is Arc's popover holding a combobox with aria-activedescendant over a listbox; filter chips are buttons named "Remove filter: Source is Google". Compare is Arc's switch.
- Saved views are buttons named with their filters and range, and the open one carries aria-current. The realtime count is a polite live region.
- Table headers are sort buttons with aria-sort. The open row carries aria-current, and deltas carry a text direction, not only colour.
- The detail panel is a labelled complementary region. Escape and the close button return focus to the row; Export and Copy confirm through polite live regions.
- KPI values, the detail figure and the online count roll on Arc's animated counter; row counts count with tabular numerals; bars rescale on a short CSS transition.
- The selected KPI and the open saved view take a calm fill in place, never travelling between items; card switchers use Arc's segmented control.
- The chart crossfades when the range, metric, site or filters change, and morphs in place when Compare rescales the axis.
- The detail panel slides 16px in from the right over the page, so nothing beneath it reflows; switching rows crossfades its content once.
- Menus and the filter popover use Arc's own enter and exit; buttons are Arc's Button (press to 0.97, label crossfade) while menu triggers answer with colour only. Export confirms inside a reserved width, so nothing shifts. Reduced motion makes every change immediate.
- The shell handles the frame: the sidebar becomes a sheet below 900px and the page goes edge to edge below 600px.
- The page adapts to the screen-main container: three breakdown columns, then two below 1080px and one below 640px. Tables drop signups, then duration and page views, then change and bounce rate as the column narrows.
- Below 860px the KPI strip scrolls sideways with edge fades; below 760px the header buttons shrink to icons and a short range label. At phone widths the chart is 180px tall and the detail panel covers the page.
- The page scrolls inside the frame with hidden scrollbars and edge fades; the screen itself never scrolls.
- Hand-built SVG charts with monotone cubic paths, no charting library: up to 90 daily points.
- All aggregation runs over an in-memory 200 day series and is memoised on site, filters and range. The live count updates every 4 seconds.
Notes for AI
Give your coding assistant the Markdown reference instead of screenshots.
- Use as a full analytics product screen. Replace metrics-dashboard-data.ts with your analytics source: the screen reads sites, rows per dimension, a daily series and goals from it.
- Filters OR values within a dimension and AND across dimensions; the sample data reshapes every figure and breakdown from them, and cities follow a country filter.
- Export downloads a real CSV of what the page shows. Copy uses the clipboard. Saved views, the account toggles and the realtime count are local state.
- The detail panel floats inside the page instead of using the shell's docked rightPanel, so opening it never shifts the dashboard.
- For a single explorable chart, prefer metric-explorer or revenue-explorer.
The full library index for assistants is at /llms.txt.