← Back to the screen

Design system portfolio

Design record: Meterbox

The four direction lines behind this page, the generator command that produced its tokens, and the pairs it was measured against.

Usage-based billing for one account: this month's meter, the projection, and the draft invoice.

Direction

Archetype : Shell. A persistent rail, a sticky account bar, one content well.

Data stance : Tile-first. Four reads carry the period, each with its comparison, and the projection takes the larger tile. Meters and the invoice sit under them as evidence.

Density : Compact. A 4px spacing step, 32px controls, 13px secondary text, tabular figures wherever numbers stack.

The one bold thing : The Radix scale used as roles, visibly and labelled. Step 3 hovers, 5 selects, 6 rules, 9 fills, 11 sets secondary text, 12 draws the overage segment. The accent is a hue whose step 9 actually carries white text.

Generator commands, verbatim

radix_tokens.py --shadcn zinc          # emitted tokens.css (not edited)
radix_tokens.py --solid                # chose the accent
radix_tokens.py --guide                # the step-to-role table
radix_tokens.py --hue iris             # the accent scale, in the page's token layer

The generator wrote tokens.css. The page links it and never edits it. The iris scale is --hue iris verbatim, re-expressed under :root, @media (prefers-color-scheme: dark) :root:not([data-theme="light"]), and :root[data-theme="dark"].

Why iris

--solid measures white on step 9 for all 31 hues. Five clear 4.5:1: indigo 5.21:1, iris 5.37:1, plum 4.75:1, purple 5.18:1, violet 5.39:1. Blue measures 3.26:1 and fails. Iris carries a billing product's seriousness, and it is not the generated-design violet.

Measured pairs

White on --iris-9 #5b5bd6, the solid button label at 14px/500 (15px/600 before round nine) : 5.37:1, needs 4.5:1. APCA reads Lc −81.7, which clears the 14px/500 floor

--muted-foreground #71717b on --background #ffffff, all secondary text in the light theme : 4.83:1, needs 4.5:1. APCA reads Lc 73.5 and allows it from 24px/400

--muted-foreground #9f9fa9 on --background #09090b, the same text in the dark theme : 7.58:1, needs 4.5:1

--iris-9 on --muted #f4f4f5, the meter fill in the light theme : 4.88:1, needs 3:1

--iris-11 #b1a9ff on --muted #27272a, the meter fill in the dark theme : 7.08:1, needs 3:1

--iris-11 #5753c6 on --background #ffffff, the accent link : 6.07:1, needs 4.5:1

The two meter segments against each other, within allowance and billed : 2.48:1 light, 1.62:1 dark. Each clears 3:1 against the track and a 3px gap of track sits between them, so no pair on the bar is adjacent. The percentage, the money and the 100% mark all repeat what the colour says.

Two step swaps, both measured

Radix names step 8 as the focus ring. It measures 2.46:1 on white, under SC 1.4.11's 3:1, so the ring takes step 9 in light (5.37:1) and step 11 in dark (9.46:1 on --background).

Steps 9 and 10 keep their colour across themes, so step 9 falls to 1.95:1 on the dark meter track. The fill takes step 11 there.

Control edges

shadcn's --border measures 1.27:1 on white. It rules between reads, meter rows, and table rows, where it decorates. Anything bounding a control (the outline button, the account picker, the segmented control) takes --muted-foreground at 4.83:1.

Second state

The reading dated 8 September, 14:20 carries a meter that stopped reporting. Selecting it swaps every figure derived from that meter rather than adding a footnote under one of them. A notice names the meter and links to it. All four reads print the figures that exclude it: $48,962 projected, $17,952.89 accrued, 44.9% of the commitment drawn, $8,962 forecast overage. The meter row shows its last count and a dashed void in place of a bar. The invoice line reads Held, and the usage subtotal and the amount due fall with it. Zero (within allowance), held (not reporting), and Not yet (tax, calculated at close) are three visibly different marks.

What stays at the default

The radius. --radius is shadcn's own 0.625rem and the page derives its two smaller steps the way shadcn does. Colour, the absence of shadow, rules in place of cards and Geist, set tabular for every figure, carry the difference instead. (Round nine replaced the monospace figure voice; see below.)

Deviation from the contract

CONTRACT.md §5 asks for the dark set under :root:not([data-theme="light"]) and :root[data-theme="dark"]. The iris scale does exactly that. The generated zinc set publishes its dark values under .dark, which is shadcn's own contract and which §1 forbids editing, so a synchronous head script sets the class and the attribute together before first paint.

Uplift round, 2026-10-29

What changed and why. The archetype (shell), stance (tile-first), density and the accent (--hue iris) are unchanged. tokens.css is untouched; the page layer gained --surface-ground (iris step 2, the chart panel), --surface-pressed (step 4, every :active) and --fill-label, all references to the existing scale.

Round two, 2026-10-29: the figure explains itself

The critic's note was that the projection landed and a stock dashboard followed. The first fold is now the figure at up to 9rem and, directly under it, one bar on one scale ($0 to $50,000) that is the figure: accrued (plan fee $4,800.00, query compute $12,351.00, seats, storage and events $979.49 = $18,130.49) plus 19 days carried at $1,648.23 ($31,316.37), with the $40,000 commitment drawn through it and the part beyond it, $9,447, in step 12. Neutral and step 5 for what is fixed, the accent fill for the meter that drives it (68.1% of accrued), step 3 with a dashed edge for the run-rate, the chart's own dashed language. The held reading re-lays the bar ($17,952.89 + $31,009.52 = $48,962). Under 52rem of container width the bar keeps its shape and a list names it. The ledger and the chart moved down a row, unchanged. Segment text on step 3 uses step 12 (secondary text measured 4.3:1).

Round four

Round eight (2026-10-29)

Round eight, second pass: the longest account name

The earlier pass left "Åkerlund & Sønner Logistikk Norge AS, Growth" clipping under the chevron at 1440 light, and called it a stress case. It was a defect of the control, not of the name. Cause: under appearance: base-select the select is a flex box, and text inside a flex box does neither wrap nor take text-overflow, so the selected label (347px in a 270px box) ran over the 32px of right padding that is meant to clear the chevron. Fix: the label is held in its own element, <button><selectedcontent> as the first child of the select (parsers without customizable select drop it and show the native control as before), with selectedcontent set to overflow: hidden; text-overflow: ellipsis; white-space: nowrap. At 1440 light the longest name now reads "Åkerlund & Sønner Logistikk Nor…" and ends 33px short of the chevron; the default "Northwind Analytics, Growth plan" still fits whole, and the open list shows every name in full in both themes. At 390 the 100%-wide control fits the longest name whole. The 17rem cap from the first pass is unchanged.

Gate follow-up. The first version of that button (no aria-hidden) failed check.sh: aria_lint W002 (a button with no accessible name) and a11y-probe (a 218x13 button with a neighbour inside 24px, light and dark at 1280). The select already carries the name and the value, so the button is a paint surface and nothing more: aria-hidden="true" tabindex="-1", align-self: stretch so it fills the control, and the select's own padding moved onto it (padding: 0 var(--step-8) 0 var(--step-3)) so the chevron clearance survives. Declined: a display: block label with a line-height (no ellipsis, the text ran under the chevron) and widening the cap to 24.5rem (it would change the toolbar's rhythm to suit one name). check.sh radix-shadcn ends PASS; the role="listbox" aria_lint finding is the one kept in aria.ignore before this round.

Round nine (2026-11-09): the world-class pass

Scored against Vercel's and Linear's billing pages, below the fold as well as above it. Heuristics, before then after (0 to 4): status 3 to 3, real world 3 to 3, control 3 to 3, consistency 2 to 3, error prevention 3 to 3, recognition 3 to 3, flexibility 3 to 3, aesthetic 2 to 3, recovery 3 to 3, help 3 to 3; total 28 to 30. Held at 3, not 4: the topbar still stacks four controls and two states on one row, and the Reading toggle is named by a date, not by what the reading is.

Findings, severity first.

Checked and correct to the cent: components $4,800.00 + $12,351.00 + $768.00 + $33.89 + $177.60 = $18,130.49; seats, storage and events $979.49; 1,342.5 h x $9.20 = $12,351.00; daily average $18,130.49 / 11 = $1,648.23; 19 days carried $31,316.37; projected $49,447 (49,446.79 unrounded, 49,446.86 from the displayed parts); over $9,447; inside $21,870 (21,869.51); drawn 45.3%; +16.8% on $42,318.06; +23.4% on $14,692.50; due so far $16,880.49; crosses at day 24.27, Friday 25 September. Held: $48,962, $17,952.89, 44.9%, $16,702.89, +15.7%, +22.2%. 1 September, 4 September, 8 September, 11 September, 25 September and 1 October 2026 are Tue, Fri, Tue, Fri, Fri, Thu.

Not built: a period switch. The brief is the open September period; the second state is the held reading, and the account picker now has its own.

Round ten (2026-11-09): the page remembers what you did

A fresh pass as the finance lead who reads the bill and decides what to do about the $9,447 overage, at 1440, 390 and 360, in both schemes, every dialog, the palette, the popover and both readings driven. Scores, before then after (0 to 4): status 2 to 3, real world 3 to 3, control 3 to 3, consistency 3 to 3, error prevention 2 to 3, recognition 3 to 3, flexibility 3 to 3, aesthetic 3 to 3, recovery 3 to 3, help 2 to 3; total 27 to 30. Round nine's 30 gave credit for states that did not yet change the page. None is below 3 now. Held at 3, not 4: the account bar still stacks four controls and two states on one row, "Reading" is still the page's own word, and a payment has no in-page way to be taken back (the credit line says where it goes).

Findings, severity first.

Not built: undo for a payment (the page is a draft view; a refund is a billing-owner action), and a commitment change (no price list is given for a higher commitment, and the page does not invent one).

Round thirteen (2026-11-10)

Defect, from the independent reviewer (37/40, ship as an example): the Design notes card said "Press Colour roles in the account bar", but Roles and Export leave the bar at 60rem (a tablet as well as a phone), so the note named a control that was not there. Reproduced at 360, 390 and 768; the button is present at 1440 and 1920 only.

Not changed: the payment toast disappearing after about five seconds (reviewer note 3; the invoice line is the record, and a longer toast would be a new rule). Inventions: none.