Design and Code Parity
Two libraries claiming to be the same system will diverge. Decide where truth lives, and make the other side derive from it.
Definition
Parity is the degree to which the design library and the implemented components describe the same thing. Perfect parity is not achievable in two separate tools, so the useful question is which differences are acceptable and how drift is detected.
Craft convention. True because the industry converged on it. Breaking it costs familiarity, not correctness.
On this page
Reducing drift in order of leverage
- 1
One source for tokens
Colours, spacing, type and radii defined once and generated into both platforms. This removes the largest and most visible category of drift.
- 2
Names that match
If the design library calls it 'Menu' and the code calls it 'Dropdown', every conversation costs a translation and the mapping eventually breaks.
- 3
One documentation surface
Usage guidance written once and shown alongside both the design component and the coded one. Two sets of guidance become two systems.
- 4
Automated visual comparison
Snapshot tests on the coded components catch unintended change. They do not catch intended change that was never reflected in design, which is why the review step still matters.
- 5
A scheduled reconciliation
A recurring pass comparing the two libraries, with findings logged like any other defect.
Which differences to accept
| Difference | Verdict | Why |
|---|---|---|
| Token values | Never acceptable | Everything downstream inherits the error. |
| Component names | Never acceptable | Breaks communication and any mapping between the two. |
| States shown | Design may show fewer | A design library need not render every loading permutation. |
| Layout behaviour | Code is the truth | Real reflow, overflow and text scaling only exist in the implementation. |
| Motion | Code is the truth | Timing and easing cannot be judged accurately in a static tool. |
Continue from here
Each link says what the connection is, so you can tell a principle from an alternative from a thing people mix this up with.
Related concept
Connected closely enough to change how you apply this.
- Specification to Working CodeAI workflow
- Component Anatomy, States and VariantsDesign system
- Design System AuditsDesign system
- Design System DocumentationDesign system
- Design TokensDesign system
- Design HandoffWorkflow
- Design QAWorkflow