00library / indextokens v1.0.0

Component library

The primitives this site is built from. The page imports the same components the site uses, so the documentation cannot go stale - if a component changes, its specimen changes with it.

01library / colour6 primitives

Colour

Six values and no gradients. Components never reference a primitive directly - they reference a role, and the role is what changes between light and dark.

Primitives

swatchtokenvaluerole
--ink#101A2BDeep navy. Text and dark surfaces. Not a tinted black - it reads as drafting ink.
--paper#F7F8FACool white ground. Deliberately not cream.
--redline#E5007DMagenta. Annotations, measurement marks, active states. The signal colour.
--measure#00A3C4Cyan. Secondary annotation - dimensions, grid overlays.
--rule#C9CFD8Hairlines, dividers, inactive marks.
--slate#5A6675Secondary text, captions.

Semantic roles

Derived values are computed from the primitives by the token build, never eyedropped. Roles marked solved are generated by blending toward ink or paper until they clear 4.5:1 against every surface they are drawn on - a label on a tinted surface is checked on that tint, not on the page. The build fails if any pairing misses, so an inaccessible pair cannot ship.

rolelightdarkusecontrastorigin
--c-bg#F7F8FA#101A2Bsurfacen/apaper
--c-bg-raised#F0F1F4#1E2737surfacen/amix(paper, ink, 0.03)
--c-bg-sunken#E9EBEE#151E2Fsurfacen/amix(paper, ink, 0.06)
--c-text#101A2B#F7F8FAtext16.4 / 16.4
vs bg, needs 4.5
ink
--c-text-muted#5A6675#969BA3text5.5 / 6.24
vs bg, needs 4.5
slate
--c-text-invert#F7F8FA#101A2Binversen/apaper
--c-line#C9CFD8#3A4250surfacen/arule
--c-line-strong#88909B#616873line3.04 / 3.1
vs bg, needs 3
solve(rule -> ink, non-text on bg)
--c-accent#E5007D#E5007Dmark4.27 / 3.84
vs bg, needs 3
redline
--c-accent-strong#DC017A#DC017Afill4.57 / 4.57
vs paper, needs 4.5
solve(redline -> ink, text under paper)
--c-accent-quiet#F5DFEE#36153Asurfacen/amix(redline, paper, 0.9)
--c-accent-text#C70472#EA4AA3text4.52 / 4.53
vs accent-quiet, needs 4.5
solve(redline -> ink, text on bg + accent-quiet)
--c-measure#00A3C4#00A3C4surfacen/ameasure
--c-measure-text#06738E#0CA7C7text4.54 / 4.53
vs measure-quiet, needs 4.5
solve(measure -> ink, text on bg + measure-quiet)
--c-measure-quiet#D9EEF4#0D354Asurfacen/amix(measure, paper, 0.88)
02library / type9 steps · ratio 1.25

Typography

A 1.25 minor third from 16px. Nine steps, nothing between them. Body copy is capped at 68ch and left-aligned.

Design and code in sync--size-8 61px
Design and code in sync--size-7 49px
Design and code in sync--size-6 39px
Design and code in sync--size-5 31px
Design and code in sync--size-4 25px
Design and code in sync--size-3 20px
Design and code in sync--size-2 16px
Design and code in sync--size-1 14px
Design and code in sync--size-0 12px
displayBricolage Grotesquevariable, wdth 78-100
bodyIBM Plex Sansline-height 1.6
monoIBM Plex Monoreal token values only
measure68chbody copy maximum
03library / space11 steps · base 4px

Space and grid

space-N is N x 4px. The scale is sparse on purpose - these are the only legal steps, which is what makes the measurement marks in the margins meaningful.

tokenvaluescale
--space-14px
--space-28px
--space-312px
--space-416px
--space-624px
--space-832px
--space-1248px
--space-1664px
--space-2496px
--space-32128px
--space-40160px
columns12content occupies 3-10
gutter24pxcolumn gap
max width1280pxpage container
04library / components

Components

Every state a component can be in is on this page. States that only exist in a designer's head get implemented differently by every engineer who meets them.

Button

Three variants, three sizes. Variant and size are data attributes, so a button's configuration is readable in the DOM inspector.

primarysecondaryquietloadingdisabledsize smsize lg

Disabled buttons keep their text legible rather than fading to nothing, and are still reachable by screen readers.

tokens consumed

  • --c-accent
  • --c-line-strong
  • --space-3
  • --space-6
  • --size-2
  • --radius-md

Field

Label, control, hint and error as one unit. The control cannot be rendered without its label.

Validates on input, not on blur.
empty
disabled
Resizes vertically only.
textarea

The error replaces the hint rather than stacking beneath it, and is wired through aria-describedby so it is announced with the control.

tokens consumed

  • --c-line-strong
  • --c-accent
  • --space-3
  • --space-4
  • --size-1
  • --size-2
  • --radius-md

Switch

A real button with aria-pressed, not a styled checkbox. Drives the grid and annotation controls in the header.

presseddisabled

Try the grid and annotation switches in the header - same component.

tokens consumed

  • --c-accent
  • --c-bg-sunken
  • --c-line-strong
  • --duration-fast

Tag

Mono, hairline, square. Used for stacks and categories, never for decoration.

Design tokensGovernanceAccent

tokens consumed

  • --c-line
  • --c-accent-quiet
  • --size-0
  • --space-1
  • --space-2

Panel

A bounded region. Square corners, one hairline, no shadow - deliberately not a card.

Panel

Content that needs a boundary gets a boundary. Content that does not, does not.

tokens consumed

  • --c-line
  • --c-bg-raised
  • --space-6
  • --radius-sm

Annotation marks

The measurement layer. Lengths and labels are read from the spacing scale, so a mark cannot disagree with what it measures.

state labelactive--space-4: 16pxtoken callout

The switches in the header turn the layer off entirely, and reveal the 12-column grid it is measured against.

tokens consumed

  • --c-measure-text
  • --c-accent
  • --hairline
  • --size-0