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.
- First fold is a composition. The projection is set at 5rem in the sans face (the one place a figure leaves the monospace, because DejaVu and other fallbacks give the comma a full cell). Beside it the month is drawn by hand in SVG at the pixel width it is shown: accrued line, dashed run-rate, the 40,000 commitment, last period's same-day ghost, the overage wedge, and one annotation naming the day the line crosses (25 September, 1 Sep + 24.27 days).
- Every figure is arithmetic. The month is 11 daily amounts in cents that sum to 1,813,049. Projected = accrued / 11 x 30 = $49,447; overage = $9,447; drawn = 45.3%; +16.8% on $42,318.06; +23.4% on August's $14,692.50 at day 11; due so far = accrued - $1,250.00. The held reading removes $177.60 (three days of $59.20) and every figure, the chart and the CSVs follow: $48,962, $8,962, 44.9%, +15.7%, +22.2%, $16,702.89. The popover prints the working.
- One interaction. The chart is scrubbed by pointer or by a native range input (arrow keys, aria-valuetext). The readout says what accrued that day, or how far over/under the commitment a projected day lands. The reading toggle ticks the figures once (280ms, 90ms under reduced motion).
- Radix behaviours. Command palette (Ctrl/Cmd+K) with filter, groups, arrow keys, jump-to-meter, reading, export, theme and roles. Native
<dialog>for Pay down balance, Popover API for the working, toasts with dismiss and pause on hover or focus. Exports are real CSV downloads. - Roles overlay. "Colour roles" pins the Radix step number on each element that uses one (5, 9, 11 or 9, 12, 6, 2); the notes panel prints the 12-step ramp with the job each does here, and says which steps are held back.
- Phone. The rail becomes a bottom bar, dialogs become bottom sheets, the invoice becomes a list (quantity x rate under each line).
- Fixed:
--color-popoveris a Tailwind@themealias and not a real custom property in a plain page, so popover surfaces were transparent; they now read--popover. aria.ignorerecords H002 on the palette's listbox (ARIA 1.2 combobox).
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
- The projected figure's dollar sign is half the digits' height and top-aligned to them, and the caption beside it hangs off the figure's own baseline (its last line, the link, stands on the line the digits stand on).
- The account select centres its text in the 32px control; the customizable select had started it at the top edge.
- The composition bar has one annotation system: a flag on each boundary under the bar, in 600 over its figure, with a hairline up to the boundary it names. The bracket row above is gone (its totals moved into Today's flag), and the small segment now has its own flag rising to its centre. Every segment is named. Below 52rem the list still names them.
Round eight (2026-10-29)
- "Growth plan" runs into the chevron (1440 light). Real: the select wrap was capped at 15rem and the option text needs about 262px, so the label ran 24px into the chevron's padding (
scrollWidth262 againstclientWidth238, a browser does not draw an ellipsis inside a select). The cap is now 17rem and the default account reads whole. The longest account name still clips at the control's edge, by a character, under the chevron; it is a stress case and the list that opens shows it in full. - "Inside the commitment" mostly empty, labels crowd (same view). Real. Every other segment carries a figure and this one carried only a name and the crossing date. It now holds its figure,
$21,870(the commitment less what has accrued,insideinderive(), so it moves with the reading), with the crossing date on the same line. Inside plus the $9,447 over is the $31,316.37 carried forward. The two flags either side of the day line tookstep-3padding instead of 8px, so "$979.49" and "Today, 11 September" no longer meet at the hairline. - Bottom nav covers the page (390). Not a defect. A fixed bottom bar sits over whatever has scrolled under it; the page reserves
6remat the foot and the last note clears the bar (screenshot of the scrolled-to-end page). Moving the bar into the flow would make it scroll away, which a tab bar must not.
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.
- Severity 3. Colour roles broke the composition bar. The overlay made every marked element
position: relative, which overrode the bar's absolutely placed segments, so pressing Roles collapsed the headline bar into a stack. The segments keepabsoluteunder the overlay now. - Severity 2. A dead account picker. Choosing another account changed the label and nothing else. The three other accounts now open a real state: a sandbox that is not billed, and two accounts the reader has no billing access to. The rail names the account, Pay, Export and the reading toggle are disabled, the palette offers only a way back, and the longest name still breaks inside the heading.
- Severity 2. The page contradicted itself. "First overage since March" sat beside a last period that closed at $42,318.06, over the $40,000 commitment. The line now says "Past the commitment from 25 September" and gives query compute's 68.1% of accrued.
- Severity 2. Chart labels struck through. The day cursor ran over "Accrued" and "Commitment" labels at 360 and 390. The cursor is drawn under the series, every label has a halo in the panel's own ground, and the phone label is two lines left of the dot.
- Severity 1. Static no-script daily figure read $1,806.12 against the script's $1,804.55; fixed. 1,942.5 of 600 hours is 323.75%, now printed 323.8% (half up), also in the palette and the bar's label. Three controls at 15px beside three at 13px in the account bar now share 14px. The brand lockup wrapped to "Northwind / Analytics" and now stacks. Table first and last cells sit on the section edge, not 12px inside it. Ramp labels share baselines (subgrid) and no longer touch at 1920. Ratio notes no longer orphan "4.5". The ledger gained a fourth read, the daily average, which closes the void under it. Meters, like the invoice, read at 72rem; the account bar's right edge follows the well at 1920. A finger gets 40px controls (coarse pointer). Pay is full width on a phone and rides beside the account between 30rem and 60rem. A visible "Reading" caption names the toggle at 36rem and up.
- Type. The page now loads Geist from Google Fonts, the face shadcn and Vercel ship, for text and figures. Figures use its tabular numerals. The earlier monospace figure voice read as "$31 , 316 . 37" with a full cell for every comma and period; the reference billing pages set figures in the sans, and so does this one. The dollar figure's tracking moved from -0.06em to -0.045em, where the comma stopped touching the 4.
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.
- Severity 3. Paying changed nothing. Pay said "scheduled" in a toast and the page kept showing $16,880.49 due, a live Pay button and no record, so a second press paid twice. A payment is now a state: the invoice gains a "Payment on account" line, "Due so far" falls to 0.00 ("Paid in full. Usage after today adds to it."), the button reads "Paid up" and is disabled, the palette drops the command, the CSV carries the line, and the toast says "Paid", names the card and links to the invoice line. Switching to the held reading after paying shows the small credit that results (the held reading has $177.60 less usage), and paying under the held reading then switching back leaves $177.60 due, "After your payment".
- Severity 2. The payment control did not say it was once. Above the action the dialog now states the price, that it is charged once, that it does not recur and that no card is kept for later, and how to stop it (Cancel; nothing is charged until Pay).
- Severity 2. Paying under the held reading hid a missing meter. The dialog now says the reading leaves out Events ingested and that the balance can rise after paying.
- Severity 2. The overage had no next step and no terms. The forecast tile now links to a spend alert (a real switch in Plan and commitment, also in the palette) that emails the billing owner at the $40,000.00 commitment, and the plan names how the overage is billed (same rates, no cap, on the 1 October invoice). The switch is 24px and 32px on a coarse pointer, its track takes the control edge, its states differ on hover, focus and press.
- Severity 2. Palette ranking. "ev" put Invoice preview (the "ev" in preview) above Events ingested. A word that starts with the query now beats a word that contains it, and groups follow their best match.
- Severity 2. The toggle was named by a date. "8 Sep, 14:20" is now "Events held"; the date stays in its accessible name, the notice and the palette.
- Severity 1. Phone invoice rows read "1 ×$4,800.00" (uneven gap), now one thin space either side. The account bar's right edge stopped 40px past the well at 1920 (a sign in its padding), now level with it. The Pay button keeps its width when it reads "Paid up", so the row does not shift.
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.
- The note now names the control the width has. Wide: "Press Colour roles in the account bar". At 60rem and under: "Press the search button in the account bar and choose Show colour roles", which is the palette command that exists at every width (driven at 360, 390 and 768: the first result for "colour roles" turns the overlay on). Two spans, one rule (
.at-wide,.at-narrow). - Swept the other instruction text at 360, 390, 768 and 1440. "An account bar that stays put" was false at 60rem and under (the bar is static there), and "on a phone the rail becomes a bar" left out tablets; the line now says tablet or phone for the rail and the account bar, and phone only for the invoice list. The Behaviour note named only Control or Command plus K; it now also names the search button, which every width has. The palette footer ("up down move, Enter run, Esc close") is hidden on a coarse pointer, where there are no such keys.
- Rail mark after an account change (reviewer note 2, reproduced at 1440: pick the sandbox from #plan, pick Northwind again, the rail still read "Plan and commitment" at the top of the page). Changing account now re-runs the section spy once the page has laid out; it reads "Overview".
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.