Context - Shared Variables Dilemma

The Problem

Design Systems often live within design tools as component libraries.

Maybe there is a code component library so developers can work with components as well.

Components are

  • often badly documented (why add docs, you can just copy and paste the component)
  • hard to understand and reason about (e.g. why is the padding 4px? Why is the button blue?)
  • work-intense to keep up to date when the design system changes

Define the design tokens as global entities but develop the components operating within their own semantic context.

From this...
From this...
...to this! 😁
...to this! 😁

Renaming Approach


Create consistent variable names for design tokens without introducing new mental models.

Code Example 🤖