Skip to content
Primer printing platePrimer

Dashboards

Visual rules for Vite dashboard pages. Semantic surfaces, one accent series, status color only for status.

Dashboard pages are application-owned HTML. Primer still does not ship charts, cards, or a shell. These specimens are the contract for Vite pages while Notion databases move to Supabase.

Build each page as static HTML with Vite. Import the token and type stylesheets, set data-primer-theme on <html>, and put .primer on the page root. See web usage and type rules.

A page answers one question. The title names it. One muted sentence gives the grain: which table, which window, when it was read. A second question with its own filters is a second page.

Notion databases become tables first. Add a chart only after the table can answer the question. A colored Notion select is a label, not a palette entry.

Open invoices

What is still open, by client. Read 10 Oct 2026.

AllOpenOverdue

48

open

12

overdue

+4 vs September

—

written off

Northwind · 14 · open

ClientStatusOpen
NorthwindOverdue14
HeliosOpen9
HarborOpen6
FieldnoteOpen4
4 more

color.background.strong is the hovered row, not the card. color.accent.fill is for a rare action, never a chart area or a metric tile. Keep the content column near 1120px. Below 720px, stack the panels.

Region Treatment
Page color.background.subdued. Dark is the default.
Section gap space.large-200 (32px).
Panel color.background.base, 1px color.border.subdued, radius.base, padding space.base or space.large-100.
Filter row Text and a bottom edge on the active filter. No filled chips.
Figure The value in Geist, weight 800. Unit and comparison in .primer-small and color.text.subdued.
Missing An em dash in color.text.subdued. Never 0 for unknown.

Show two to four figures. A fifth figure is another table row. Do not paint the tile to match the delta. Color the comparison words only when the direction has a meaning, and repeat that meaning in text.

Position carries the value. Color names the series or the status. Bars start at zero. More than three series means small multiples, or a return to the table.

36180MayJulSep
Change over time. Points only when the series is short.
NorthHeliosHarborField
Rank. Sorted, from zero, labels upright.
Open 62Paid 70Void 8
Part of a whole. Four parts at most, labeled.
Median030d
Distribution. Neutral bins, one accent threshold.
Question Mark Avoid
Change over time, one measure Line. Points only when the series is short. Area fill behind a single line. Dual axes.
Change over time, two or three measures Lines, labeled at the last point. A legend far from the lines.
Rank Horizontal bars, sorted. Vertical bars with rotated labels.
Part of a whole, up to four parts One stacked bar, or the table. Pie, donut, gauge.
Distribution Histogram in a comparison role, one accent threshold. A smoothed curve with no bins.
One row against a target The number, then a short bar from zero. A radial gauge.

The same measure keeps the same slot on every page. Use the themed chart, accent, and status roles so each theme resolves consistently.

OpenedPaidVoid
PrimarySecondaryTertiary
PaidOverdueFailedScheduled
Below target0Above target
Slot Dark Light Use
Primary --primer-color-accent-base --primer-color-accent-base The measure the page is about.
Secondary --primer-color-chart-series-2 --primer-color-chart-series-2 A comparison series.
Tertiary --primer-color-chart-series-3 --primer-color-chart-series-3 A baseline or a third series.
Status --primer-color-success-base, --primer-color-warning-base, --primer-color-critical-base, --primer-color-info-base same roles Only when the datum is that status.

Marks clear about 3:1 against color.background.subdued. Labels use color.text.base or color.text.subdued and clear 4.5:1. Do not invent a hue per Notion select, tag, or Supabase enum.

A diverging scale is only for a signed deviation from a stated midpoint: color.critical.base, color.chart.series-2, color.success.base. Label the midpoint, as the strip above does.

Horizontal gridlines use color.border.subdued. No vertical grid, no plot border, no tint behind the series. Tick labels are 13px in color.text.subdued, four to six of them. Direct-label a series at its last point. A legend, swatch then name, is only for a plot the label cannot reach.

The primary stroke is 1.5px. Other strokes are 1px. Bars have no stroke. Points are 4px, and the focused point grows without changing hue. The tooltip is color.background.base, a color.border.base edge, and one line: series, value, date.

The table is the accessible form of the chart. Header text is muted, weight 600. Numerics align right and stay tabular. Row padding is space.small-200 by space.small-100. Hover fills the row with color.background.strong. The selected row keeps a 2px color.accent.base edge and aria-selected. Status is a word first; the status color may tint that word.

Put the source table on the page. When a bar chart cannot show every row, the last table row reads “N more”.

Open invoices

Loading invoices.

Open invoices

No open invoices in the last 6 months.

Open invoices

Could not read invoices.

State Show
Loading The title and a muted line. No shimmer and no skeleton chart.
Empty The title and one sentence naming the filter that produced nothing.
Error The sentence in color.critical.base. Do not draw a partial chart from a failed query.
Stale The page note carries the read time. A failed refresh is color.warning.base text.

A filter change may fade in motion.duration.small-100 (150ms). No path-draw intro. Chart code follows .primer and drops animation under reduced motion.

Interactive marks are buttons or links with a 2px color.focus outline and no glow. The focused point in the line specimen is that outline. The table stays in the same tab order.

  • A second brand hue, a purple or blue gradient, or a categorical rainbow.
  • Pie, donut, gauge, 3D, and dual-axis charts.
  • Drop shadows, glass, and large accent fills.
  • Colored filter chips that compete with the data.
  • Sparklines with no printed value.
  • Decoration that does not name a measure, a series, or a status.

Draw marks in SVG. Read series colors from the custom properties so a theme switch repaints the page.