Framework: Token–Component Sync Map

1. Purpose

To create a systematic mapping between design tokens and components so that every component:

  • Inherits tokens (not manual styles).
  • Syncs automatically with updates.
  • Can be implemented in dev with 1:1 parity.

2. Why This Matters

  • Without token → component linkage, libraries drift: buttons with custom hex, inputs with inconsistent spacing, etc.
  • Devs then code “random values” → inconsistency across products.
  • Sync Map ensures design = dev = QA parity.

3. Mapping Model

Token CategoryToken NameApplied ToComponent ExamplesNotes
ColorColor-PrimaryFill, borderButton/Primary, Link/ActiveMust meet contrast AA
 Color-ErrorFill, text, borderInput/Error, Alert/ErrorRed used only for errors
TypographyFont-HeadingH1–H3Card Titles, Modal HeadersUse consistent line height
 Font-BodyBody textInputs, Forms, ParagraphsBase size = 16px
SpacingSpace-2 (8px)Gaps inside formsInput fields, CardsBase multiple = 8px grid
 Space-4 (24px)Section paddingModals, CardsUsed for container padding
RadiusRadius-Small (4px)Small interactive componentsButtons, InputsSubtle rounding
 Radius-Large (12px)Larger modulesCards, ModalsFriendly feel
ShadowsShadow-1Low elevationCards, DropdownsSoft subtle shadow
 Shadow-2High elevationModals, TooltipsProminent, layered

4. Sync Workflow

  1. Design Stage
    • Every component must inherit tokens directly (never raw values).
    • Component builder checks: “Are all fills, borders, spacing = tokens?”
  2. Library Maintenance Stage
    • Monthly audit (see Doc 10.4 Cleanup Checklist).
    • Scan for overrides (random hex, manual font sizes).
  3. Dev Handoff Stage
    • Export tokens in JSON/Style Dictionary format.
    • Dev team implements same tokens in CSS/React Native/Flutter.
    • Components mapped directly to code components.

5. Example – Button/Primary

ElementToken AppliedValue (example)
BackgroundColor-Primary#3B82F6
Border RadiusRadius-Small4px
FontFont-Button-TextInter 16px SemiBold
PaddingSpace-2 vertical, Space-4 horizontal8px × 24px
ShadowShadow-10 1px 2px rgba(0,0,0,0.05)

6. Governance

  • No component can be approved if tokens ≠ are applied.
  • Violations flagged in Component Review Log (Doc 10.8).
  • Quarterly sync meeting with the dev team to check design–code parity.

7. Usage Notes

  • Keep this map as a living doc, updated with new tokens/components.
  • Share with both design & dev teams → it’s the bridge document.
  • Store under: Design System → Token–Component Maps.