Scaling frontend development across multiple squads without visual inconsistency or runaway CSS bloat requires moving beyond arbitrary hex codes and magic spacing numbers. Design tokens—the atomic variables that define visual properties like colors, typography, spacing, shadows, and elevation—bridge the gap between Figma design systems and production frontend codebases. Architecting a three-tiered token hierarchy transforms disparate web components into a unified, mathematically consistent, themeable digital ecosystem.
Key Takeaways
- Three-Tier Token Architecture: Structure tokens into Global (primitive values), Semantic (purpose-driven aliases), and Component-specific tiers for maximum maintainability.
- The 8-Point Spacing Grid: Base all margins, padding, and layout dimensions on multiples of 8 (8px, 16px, 24px, 32px, 48px, 64px) with a 4px half-step for micro-alignment.
- Semantic Color Abstraction: Never bind UI components directly to raw primitives like
--color-emerald-700; bind them to semantic roles like--color-surface-successor--color-action-primary. - Layered Elevation & Ambient Shadows: Modern depth uses multi-layered CSS box-shadows combining a sharp directional key light and a soft ambient glow rather than harsh single-layer drops.
- Webeta Token Pipeline: Webeta synchronizes Figma design tokens directly into CSS custom properties and TypeScript definitions during CI/CD, guaranteeing 100% design-to-code parity.
The Three-Tier Token Architecture
The most common flaw in fledgling design systems is referencing raw palette values directly inside component styles. When the marketing brand updates or dark mode is introduced, thousands of lines of CSS must be manually refactored.
Enterprise design systems solve this through a disciplined three-tiered abstraction:
| Token Tier | Definition & Scope | Example Name | Resolved Value |
|---|---|---|---|
| 1. Global (Primitive) | Raw, context-agnostic design values | --primitive-emerald-800 | #0A2518 |
| 2. Semantic (Alias) | Intent-based tokens tied to meaning | --color-action-primary-default | var(--primitive-emerald-800) |
| 3. Component-Specific | Scoped exclusively to an individual component | --button-primary-bg | var(--color-action-primary-default) |
The 8-Point Spacing Grid and Sizing Hierarchy
The 8-point grid is the universal foundation of modern visual balance. Because almost all modern screen resolutions are divisible by 8, aligning spacing and component sizing to this cadence eliminates fractional pixel anti-aliasing blurring:
padding: 17px or margin-top: 23px, visual rhythm dissolves into arbitrary chaos. Enforcing spacing tokens through ESLint rules or CSS custom property linters guarantees visual harmony across disparate engineering squads.Layered Elevation & Ambient Shadows
Physical objects in the real world never cast harsh, monolithic, pitch-black shadows. Real-world elevation consists of two distinct light phenomena:
- Directional Key Shadow: Sharp, high-contrast shadow offset along the Y-axis caused by the primary overhead light source.
- Ambient Occlusion Glow: Soft, dispersed, non-directional shadow caused by bounced atmospheric light.
Need help with your tech stack?
Our engineering team specializes in scalable web architectures.
Bridging Figma Tokens to Frontend Code via CI/CD
The most sophisticated design system architecture automates token translation. When designers update color variables or border radiuses in Figma:
- Figma REST API or Tokens Studio exports token JSON definitions to a Git repository.
- Style Dictionary compiles the JSON tokens into CSS custom properties, SCSS variables, and TypeScript constants.
- Automated Pull Requests are opened in the frontend repository, eliminating manual transcription errors and ensuring pixel-perfect fidelity.
Ready to build your digital ecosystem?
Let's talk strategy. We design and engineer premium platforms for industry leaders.
Start Project DiscoveryReady to build your digital ecosystem?
Let's talk strategy. We design and engineer premium platforms for industry leaders.
Start Project Discovery

