mh studio Book a free call

● Design system · worked example

Corridor design system, a worked example.

This page documents one product: Corridor, a concept payments app from my portfolio. Every value here was measured from the Corridor app prototype, then organised the way I hand a system to a team: primitives, meaning, components, states and rules.

  • Scope: Corridor only
  • Version 1.2
  • Target: WCAG 2.2 AA
  • Click a swatch to copy its value
Layer 1 · Colour primitives

Raw values, no meaning yet.

These are the 22 colours the Corridor app actually uses. Components never reference them directly. The role under each swatch is a hint; the real job is set in layer 2.

Layer 2 and 3 · Semantic tokens

Three layers: raw values, meaning, components.

Change a brand colour once and every button, badge and chart follows. Components only ever read semantic tokens, which is also what makes a dark theme or a second brand possible without touching components.

Download tokens (JSON)
Semantic token (layer 2)Points to (layer 1)Used by (layer 3)
color.bg.canvaspaper #F6F4EEApp background
color.bg.surfacewhite #FFFFFFCards, sheets, tab bar
color.bg.fillsand-200 #ECE8DFInputs, unselected chips
color.bg.brandteal-900 #0F3D3EBalance card, card art
color.bg.icon-tileteal-100 #E6F0EEActivity icons
color.text.primaryink #0B1414Body, amounts
color.text.secondaryslate-700 #3D4746Labels, info rows
color.text.mutedslate-500 #5B6664Captions, hints, timestamps
color.text.on-brandwhite #FFFFFFText on teal
color.text.on-brand-mutedteal-200 #D4E5E2Secondary text on teal
color.action.primaryteal-900 #0F3D3EPrimary button, selected chip
color.action.primary.hoverteal-800 #14504FPrimary button hover
color.action.accentsaffron-400 #FFB547Accent button, highlights
color.action.disabledslate-200 #BFC6C4Disabled button fill
color.border.dividersand-100 #EEECE6List dividers, progress tracks
color.focus.ringteal-900 #0F3D3EFocus ring on light surfaces
color.focus.ring.on-brandsaffron-400 #FFB547Focus ring on teal
color.status.success.fggreen-700 #1F6B47Arrived badge text, valid hints
color.status.success.bggreen-100 #E3F2EAArrived badge
color.status.success.solidgreen-600 #1F8A5BSwitch on, check marks
color.status.warning.fgamber-700 #8A5A00In progress text, rate alerts
color.status.warning.bgsaffron-100 #FFE7BFIn progress badge
color.status.error.fgred-600 #B5452FInline errors, Failed badge
color.status.error.bgred-100 #FBE3DEFailed badge, error fields

Naming rule: category.role.variant.state. The same names are used for Figma variables, CSS custom properties and the JSON file, so design and code never need a translation table.

✓ Do

Pair every status colour with a word or icon. "Failed" is red and says Failed.

✕ Don't

Use Saffron for text on light backgrounds (1.6:1). It is for highlights, the accent button and focus on teal.

✓ Do

Reach for a semantic token first. If none fits, propose one (see Governance) instead of using a primitive.

Typography

Manrope, two weights, eight roles.

Only 700 and 800 are used, which keeps money and labels confident on small screens. Amounts always use tabular figures so columns of numbers line up. Nothing on screen goes below 12px (one known gap is listed under Accessibility).

type.amount.xl
50 · 800 · tabular · Amount being sent
$500
type.amount.lg
38 · 800 · tabular · Balance card
$2,480.00
type.title.screen
28 · 800 · Screen titles (h1)
Activity
type.title.section
17 · 800 · Section headings (h2)
Recent
type.button
16 · 800 · All buttons
Continue
type.body
15 · 700 · List rows, body text
Monthly to Sarah
type.label
14 · 800 · Form labels
IBAN
type.caption
12 · 700 · Captions, hints, badges
Arrives in minutes
Spacing

4-point scale

Half steps (6, 10, 14) are allowed inside compact parts like chips and badges.

4
8
12
16
20
24
32
Radius

Soft, never sharp

sm icon tiles · md inputs · lg list panels · xl cards · pill buttons and chips.

sm
12
md
14
lg
16
xl
22
pill
999
Elevation

Three levels

Surfaces are separated by colour first. Shadows are kept for things that float.

elevation.1
Quick-action tiles
elevation.2
Tab bar, sheets
elevation.3
Send button, card art
Components

Every state, not just the happy one.

Each component is specified for default, hover, focus-visible, pressed, disabled and loading. Tags show what is already built into the Corridor prototype and what is specified for the build.

Button

Three variants, live. Hover, tab to focus, or press and hold.

State matrix · primary, size lg

DefaultIn prototype
color.action.primary
HoverSpec
color.action.primary.hover, 200ms
Focus-visibleSpec
2px ring, 3px offset, color.focus.ring
PressedIn prototype
scale .96, 150ms
DisabledIn prototype
color.action.disabled; label says why
LoadingSpec
spinner, same width, aria-busy

Props

PropValuesDefaultRule
variantprimary | tonal | accentprimaryOne primary per screen
sizemd 44px | lg 54pxlgNever below 44px tall
iconleading icon, optionalnoneIcon is aria-hidden; the label carries meaning
loadingbooleanfalseKeeps width, shows spinner, sets aria-busy
disabledbooleanfalseLabel must say why ("Not enough balance")
fullWidthbooleantrueBottom action bars

Input

Filled, no stroke. The helper line is always reserved so the layout never jumps. Errors are announced with aria-describedby and aria-invalid.

DefaultIn prototype
We check it before anything is sent.
FocusIn prototype
Keep going, 8 more characters
ValidIn prototype
✓ Looks like a valid IBAN
ErrorIn prototype
That's more than your USD balance.
DisabledSpec
Unlocks if you cancel.
USD

Fee shown before you confirm.

Chips and switch

Repeat monthly

Chips: selected uses color.action.primary, unselected color.bg.fill. Switch: 52 × 32 with a 44px hit area, role="switch".

Status badges

ArrivedIn progressFailed

12 · 700, padding 4 × 8, pill. Always a word plus an icon, never colour alone.

Total balance
$2,480.00
Accessibility

Rules with numbers, checked against the build.

Ratios are calculated with the WCAG 2.x formula from the exact hex values above. The target is WCAG 2.2 AA. Where the prototype misses a rule, it is listed rather than hidden.

PairRatioWCAGWhere
Ink on Paper17.0:1AAABody text, amounts
White on Teal 90011.9:1AAAPrimary button, balance card
Teal 900 on Saffron6.8:1AAAccent button
Slate 500 on White5.9:1AACaptions on cards
Slate 500 on Sand 2004.8:1AAInput hints
Teal 200 on Teal 9009.1:1AAASecondary text on teal
Green 700 on Green 1005.5:1AAArrived badge
Amber 700 on Saffron 1004.9:1AAIn progress badge
Red 600 on White5.4:1AAError messages
Red 600 on Red 1004.4:1FailsFailed badge, fix in v1.3
Saffron on Paper1.6:1Never textDecoration only
Focus ring Teal 900 on Paper10.8:1Passes 3:1Non-text: focus indicator
Contrast
Text 4.5:1 minimum, large text and icons 3:1. Saffron is never text on light surfaces.
Targets
44 × 44px minimum for anything tappable. Primary actions are 54px tall.
Focus
2px ring, 3px offset: color.focus.ring on light, Saffron on teal. Shown on keyboard focus only (:focus-visible).
Colour alone
Status always has a word and an icon. Charts label values directly.
Motion
prefers-reduced-motion removes every keyframe animation; state changes stay instant.
Forms
Every input has a visible label. Errors use aria-invalid, aria-describedby and a polite live region.

Known gaps in the prototype

Found by auditing the build against these rules. Scheduled for v1.3.

  • Failed badge text is 4.4:1. Move status.error.fg to a darker red (#A43D29, 5.2:1).
  • Valid IBAN hint uses Green 600 as 12px text (4.3:1). Switch it to status.success.fg (5.5:1).
  • Notification count is white on Coral (2.8:1). Use a Red 600 fill (5.4:1).
  • Amount chips are 38px and chart range tabs 32px tall. They pass WCAG 2.2 AA (24px) but miss our 44px rule; extend the hit area.
  • Two 11px labels (currency names on the balance card, the sample card note) move to 12px.
  • App buttons still use the browser focus outline. Apply the focus ring token everywhere.
Motion

Three speeds, one curve.

Durations are grouped by what moves. Small things move fast; things that change the screen take longer; celebration is rare.

Quick150 to 250ms · ease-out

Press (scale .96, 150ms), colour changes (200ms), switch knob (250ms).

Standard350 to 450ms · ease-out

Sheets (400ms), drawers (350ms), screen enter (450ms, fade and rise).

Expressive700ms and up

Chart bars grow (700ms). Confetti (2.4s) only when a transfer succeeds.

One easing curve for the whole app: motion.ease.out = cubic-bezier(.2,.7,.2,1). Under prefers-reduced-motion every keyframe animation is removed. The portfolio site around this page has its own motion layer; it is not part of Corridor.

Governance

How the system stays healthy.

A system is only as good as the way it changes. This is the contribution and release process I use, shown here on Corridor.

01

Propose

A short request: the problem, screenshots of where it appears, and why an existing component does not fit.

02

Review

Design and engineering review together, weekly. Checked against contrast, 44px targets and the full state list.

03

Build

Figma component on variables and code component on the same token names. Every state from the matrix, both sides.

04

Release

Version bump, changelog entry, short note to the team. Deprecated tokens stay one minor version with a warning.

Versioning

  • Major: a token or component is removed or renamed.
  • Minor: a new token, component, variant or state.
  • Patch: a value changes but every contrast and size rule still passes.
  • Names: category.role.variant.state, lowercase, no raw colour names in components.

Changelog

v1.0 and v1.1 are sample entries for this concept.

v1.3 PlannedContrast and target fixes from the Accessibility audit above. Darker status.error.fg, focus ring token applied to every button.
v1.2 This pageTokens re-measured from the app build. Removed teal-600 (documented but never used). Added text.muted, bg.fill, border.divider, action.disabled and focus tokens. Radius scale is now 12 / 14 / 16 / 22 / pill.
v1.1 SampleAdded input helper, valid and error states, and status.warning.
v1.0 SampleFirst release: colour, type, spacing, button, chips, switch, badges.

Have a product in mind? Let's talk.

  1. 01 30-minute call
  2. 02 Scope and price within 48 hours
  3. 03 First screens in week one
Book a free call → mhdigitalstudio.com