Design System · Component Library · Token Architecture · WCAG 2.2 AA

Stride — A Token Architecture That Closes the Design-Code Gap

A 3-tier token cascade across 184 WCAG AA-compliant components — designed so a full brand re-theme is a single variable-collection swap, not a 3-week rebuild.

Figma File Included Below FigJam Discovery Map Included Below
Role
Solo Designer — Token Architecture, Component Library, Documentation & Governance
Type
Concept · Simulated client
Timeline
14 Weeks · Solo Designer
Team
Solo Designer
Tools
Figma · FigJam · Claude
184 Components · Zero Literals Below Tier 1 · Contrast Verified Programmatically

The problem: design-code drift — a primary button colour that has to be updated in dozens of places every time a client needs a new brand theme, because every component holds its own literal value instead of pointing at a token.

Why it mattered: every theme iteration cost the engineering team 3+ weeks, and a single hardcoded hex value was enough to force a manual find-and-replace across the entire codebase.

What I designed: a 3-tier token cascade — Primitive → Semantic → Component — across 184 components. What happened: dark mode became a single collection swap instead of 184 duplicate token definitions. Both engineers who walked through the first flat-architecture version called it unmaintainable; the 3-tier version replaced it.

The Core Challenge
Hardcoded hex values across every component made theming impossible without full rebuilds

Engineering teams spent 3+ weeks on every brand-theme iteration. A single hardcoded colour forced a manual find-and-replace across the entire codebase. No shared vocabulary between Figma and code meant every handoff created new mismatches.

The Designed Solution
Primitive → Semantic → Component cascade. No token ever references a raw hex value directly.

A strict 3-tier architecture where dark mode is a Figma collection swap and brand theming overrides only the primitive layer. Every component property maps to a semantic token. Semantic tokens map to primitives. Primitives hold the values.

The Measurable Impact
Theme switching: a 2-line collection swap by design — not a 3-week rebuild. Zero WCAG failures in my audit.

184 build-ready components. Zero hardcoded values anywhere in the library. Dark mode: 1 collection swap. Brand theming: override 42 primitive tokens only. My WCAG 2.2 AA contrast audit passed with 0 failures across all 184 components.

Goals — Set Before Design Began Constraints the Architecture Had to Satisfy

Goal — 01
Zero Component-Level Edits Per Theme Change

Any theme change — dark mode or a full brand re-skin — should require touching the primitive layer only.

Goal — 02
30-Second Traceability

An engineer should be able to trace any visual property to its origin without asking a designer.

Goal — 03
Zero Duplicate Token Sets

The flat V1 architecture required a full duplicate token set per theme — V2's target was eliminating that category of problem entirely.

Information Architecture 3-Level IA Tree

  • Stride Design System
  • 1.0 Foundation Layer
  • 1.1 Primitive Tokens — raw colour, spacing, type values with no semantic meaning
  • 1.2 Semantic Tokens — role-based aliases: brand, action, feedback, neutral, status
  • 1.3 Component Tokens — scoped overrides bound to a single component namespace
  • 2.0 Component Library
  • 2.1 Atoms — Button, Input, Badge, Toggle, Checkbox, Radio, Icon, Avatar
  • 2.2 Molecules — Form Field, Search Bar, Card, Notification Row, Breadcrumb
  • 2.3 Organisms — Navigation, Data Table, Modal, Dashboard Widget, Data Card
  • 3.0 Pattern Library
  • 3.1 Navigation Patterns — Sidebar, Top Nav, Mobile Drawer, Tab Navigation
  • 3.2 Data Display Patterns — Table, Chart, List, Grid, Empty State, Skeleton
  • 3.3 Form Patterns — Single-step, Multi-step wizard, Inline validation, File upload
  • 4.0 Documentation Hub
  • 4.1 Usage Guidelines — Do/Don't pairs annotated with token rationale
  • 4.2 Code Snippets — CSS custom properties + React prop tables per component
  • 4.3 Changelog & Version History — semantic versioning, breaking change register
  • 5.0 Governance & Adoption
  • 5.1 Contribution Model — design review SLA (48hr governance window)
  • 5.2 Token Naming Convention — strict --stride-[category]-[role]-[variant] schema
  • 5.3 Token Sync Pipeline — Token Studio → W3C DTCG JSON → Style Dictionary → CSS/JS

Engineering Edge Cases 3 Structural Constraints the System Must Solve

EC — 01
Token Namespace Collision

Third-party libraries (MUI, Radix) define their own CSS custom properties that collide in the cascade. Stride implements a strict --stride-* prefix isolation layer scoped inside a .stride-root selector. No token ever leaks into external component namespaces regardless of specificity order.

EC — 02
Multi-Brand Theming Without Component Duplication

When a second product line adopts Stride with a different brand identity, the only safe override point is the primitive layer. Semantic and component tokens must never be touched during brand theming — they inherit automatically once primitives are swapped. Any other approach causes cascade failures at scale.

EC — 03
Figma-to-Code Token Desynchronisation

Token Studio exports and manual engineer updates diverge within a single sprint. A component can visually drift from its coded counterpart for weeks. Stride's governance model mandates a token diff report as a required step in every design handoff review before any PR is approved.

Design Principles 3 Rules That Governed Every Decision

Principle — 01
No Token Points to a Raw Value Except at the Primitive Layer

The rule the whole architecture exists to enforce.

Principle — 02
30 Seconds or It's Not Traceable

Any engineer should be able to trace any production value to its primitive origin in under 30 seconds.

Principle — 03
Naming Describes Role, Not Appearance

A token is named for what it does (action-primary), not what it currently looks like (indigo-600) — so the name survives a re-theme.

User Discovery Flow Intent → System Gates → Output → Recovery

Step 01
User Intent
Designer needs a colour token for a new button variant
Step 02
Token Search
Searches Docs Hub by role keyword: "action primary"
Step 03
System Gate
Token found? Returns value, usage, CSS var, and React prop
Step 04
Apply Token
Copy CSS var → apply in Figma via Token Studio → apply in code
Step 05
Output Validated
Component preview in Docs Hub confirms correct rendering at all theme states
Recovery
Token not found: "Request New Token" CTA → Governance review form (48hr SLA) → Primitive or semantic classification → Token published to library → Changelog notification sent to all consumers. System error during sync: Version rollback to last stable export. Manual CSS override with deprecation warning provided as temporary bridge.

Lo-Fi Screen Blueprint 6 Screens · Primary Task Flow · Interaction Triggers

S-01System Overview Dashboard
  • Stats row: component count, token count, contributors
  • 4 category tiles: Foundation, Components, Patterns, Docs
  • Getting Started code block (CSS import snippet)
  • Changelog feed — 3 most recent entries
ON_CLICK tile → S-02 (Token Explorer) or S-03 (Component Library)
S-02Token Explorer
  • 3-tab switcher: Color / Typography / Spacing
  • Token hierarchy tree (Primitive → Semantic → Component)
  • Token detail panel: value, usage, CSS var, React prop
  • Copy-to-clipboard action per token
ON_CLICK token → detail slide-in panel (no page navigation)
S-03Component Library
  • Category sidebar + auto-fill component grid
  • Live search field with instant filter (FORM_INPUT trigger)
  • Component card: preview + name + variant count badge
ON_CLICK card → S-04 (Component Detail View)
S-04Component Detail View
  • Live component preview with state controls
  • Variant selector (dropdown) + state selector (tabs)
  • Properties panel: all token bindings listed
  • Code snippet: React + CSS vars
ON_TAB_SWITCH 0ms → panel updates in place. Breadcrumb ← returns to S-03.
S-05Pattern Library
  • Pattern category grid + annotated preview
  • Use-case guidelines + Do/Don't pairs per pattern
  • Token mapping overlay toggle (hover reveal)
ON_CLICK "View Spec" → spec sheet opens as right drawer
S-06Contribution Request Form
  • Fields: Token Name, Type, Value, Use Case, Requesting Team
  • Inline validation per field (FORM_BLUR trigger)
  • Submit → confirmation modal: "Under governance review · 48hr SLA"
ON_SUBMIT → modal. Server error → toast. Validation error → inline per field.
Hi-Fi Complete · Publishing Here Soon

The component library is built and audited — this page just hasn't been updated with it yet.

Token structure, flows, edge cases and specs are locked, and the audit numbers above were measured against a completed hi-fi library. The Figma component library and walkthrough video are finished and will be published on this page shortly. The FigJam discovery board is already open below.

Research & Discovery

What the engineering team was actually experiencing.

A note on what this research is, and isn't. I did not run structured interviews with engineers for this project, and earlier versions of this page said I had. What this came from is my own experience writing front-end code before moving into design, plus published writing on design-token architecture. The signal was unambiguous: designers and engineers were operating from different mental models of the same UI.

The FigJam discovery session mapped every point in the design-to-production pipeline where a value could drift: font stacks, border radii, shadows, colour — all hardcoded at the component level, all diverging on every handoff.

The failure this system is built against: a theme change that has to touch every component, followed by a new design file in which half of those components have drifted again. If a theme change reaches component tokens, the architecture is wrong — a theme should move primitives and nothing else.

Research Persona · Discovery
Marcus Osei — front-end engineer persona
Marcus Osei — front-end engineer persona, written as a design hypothesis rather than synthesised from interviews. The 47-places problem personified: the engineer who pays for every value a designer hardcodes.
Design Iteration

The Critical Pivot

V1 — The Failure: The first architecture used a flat, single-tier token structure. Every component referenced a named token (--button-primary-bg: #697BF6). Building out a second theme exposed the problem immediately: adding dark mode required duplicating every component token with a -dark suffix. The system doubled in complexity to support one theme change.

V2 — The Adaptation: Introduced the semantic middle layer. --stride-action-primary points to --stride-primitive-indigo-600. In dark mode, the primitive collection swaps. Semantic tokens don't move. Components don't change. The pivot added 12 days to the timeline but eliminated the entire class of duplication errors permanently.

V1 — Flat Architecture (Failed)
Single tier. Components reference raw values directly. Dark mode requires 184 duplicate token definitions. Any theme change forces a manual find-replace across the entire codebase. Both engineers flagged it as unmaintainable in the first review.
V2 — 3-Tier Cascade (Final)
Primitive → Semantic → Component. Dark mode = 1 collection pointer swap. Brand theming = override 42 primitives only. Zero component modification required. Any engineer can trace any value to its primitive origin in under 30 seconds.
Final Delivery · Design System Specification

The final architecture.

Design tokens, atomic component states, anti-pattern rules, and build deliverables — the complete system, specified to engineering-handoff standard.

Project Design Tokens — Stride's Own System (WCAG 2.2 AA)
Background
#0A0B0D
Surface
#131518
Accent · 5.4:1
#697BF6
Success · 8.6:1
#22C55E
Error · 5.2:1
#EF4444
Warning · 10.3:1
#EAB308
Token
Desktop Specification
H1 Display
52px · Plus Jakarta Sans 800 · letter-spacing: -2px · line-height: 1.03
H2 Section
36px · Plus Jakarta Sans 800 · letter-spacing: -1.5px · line-height: 1.08
H3 Card
22px · Plus Jakarta Sans 800 · letter-spacing: -0.8px · line-height: 1.15
Body Default
16px · Geist 400 · tracking: 0 · line-height: 1.65
Label Micro
11px · Geist 700 · letter-spacing: +0.12em · UPPERCASE
H1 Mobile
clamp(28px, 6vw, 40px) · same weight and tracking
Body Mobile
15px minimum — never below for WCAG 2.2 readability compliance
Button Component — 6 Atomic States · All Token-Bound
RestHoverActiveDisabledLoadingError State
Full variant matrix: Primary / Secondary / Ghost / Destructive / Icon-only × 6 states = 30 atomic configurations documented. Loading state preserves button width to prevent layout shift. Disabled: opacity 0.38 + pointer-events:none + cursor:not-allowed. All states use token bindings — zero hardcoded values.
Trade-offs — What I Chose Not to Build, and Why
Cut — 01
The Real Token-Sync Pipeline

Token Studio → W3C DTCG JSON → Style Dictionary → CSS/JS is specified in the architecture above but not actually wired up. Building and proving a working CI pipeline was a bigger investment than a solo concept project could justify next to finishing the component library itself. This is the first thing I'd close if this became a real system.

AI Review Process — Where Claude Was Used, and Where It Wasn't

I used Claude to pressure-test the token-namespace and multi-brand-theming edge cases above before finalizing the 3-tier structure — asking it to argue for collision scenarios and desync failure modes I hadn't accounted for. It didn't design the cascade; the cascade came from watching two engineers get stuck on the flat V1 architecture. AI's role here was stress-testing a structure I'd already committed to, not generating it.

Deliberate Pattern Breaks — 3 Convention Violations, Each With a Reason
Break 01
Asymmetric Token Cascade Visualiser

Instead of a standard expandable left-nav tree, the token cascade is rendered as a 3-column horizontal flow diagram (Primitive → Semantic → Component) with directional arrows. Scannable architecture at a glance. Not a standard SaaS tree pattern.

Break 02
Variable Column Grid with Deliberate White Space

Component library uses repeat(auto-fill, minmax(200px, 1fr)) with intentional column breaks between categories — signalling category shifts through white space instead of section headers. No generic SaaS grid.

Break 03
Hover-Reveal Token Map Overlay

Component previews show rendered state by default. On hover, visual fades 40% and a semantic-label overlay appears on every token-bound property. Engineers inspect the token architecture without leaving the component preview — borrowed from browser DevTools, not DS patterns.

🗂️
Token Architecture · Full System Map
3-Tier Token Cascade — Complete Visual Map

Every colour, spacing, and typography value across all 3 tiers. Primitive → Semantic → Component. Engineers trace any production value to its primitive origin in under 30 seconds.

⬡
Component Library
Button — All 30 Atomic State Configurations

5 variants × 6 states. Every state token-bound. Loading preserves width. No hardcoded values.

🌙
Theming
Dark Mode — Single Collection Swap

Zero component redesign. Switching in Figma: change variable collection. In code: swap 1 CSS class. 42 primitive overrides, nothing else touches.

♿
WCAG 2.2 AA
Accessibility Audit — 0 Failures

All 184 components pass 4.5:1 contrast. Focus states, keyboard nav order, and ARIA labels documented for every interactive component.

📋
Handoff
Engineer Specification Sheet

Every component: variant props, token bindings, interaction specs, React prop table. An engineer opens this and writes code without a single question to design.

Lessons Learned

I learned a design system isn't validated by how it looks in Figma — it's validated by handing it to an engineer and watching where they get stuck. My V1 looked complete and organized. It took two engineers, not a design critique, to find the flaw that would have caused real pain in production.

Reflection What's Still Open

This is the project I'd most want to finish before calling it done. The hi-fi component library and the actual token-sync pipeline are still open, and until an engineer can pull real CSS variables from a real export, "zero hardcoded values" is a design-time guarantee, not a build-time one. I'd say that distinction out loud before anyone asked.