Implementing Design Tokens for Web Application Design Systems

Implementing Design Tokens for Web Application Design Systems

Development and maintenance of all types of websites:

Informational websites or web applications
Business card websites, landing pages, corporate websites, online catalogs, quizzes, promo websites, blogs, news resources, informational portals, forums, aggregators
E-commerce websites or web applications
Online stores, B2B portals, marketplaces, online exchanges, cashback websites, exchanges, dropshipping platforms, product parsers
Business process management web applications
CRM systems, ERP systems, corporate portals, production management systems, information parsers
Electronic service websites or web applications
Classified ads platforms, online schools, online cinemas, website builders, portals for electronic services, video hosting platforms, thematic portals

These are just some of the technical types of websites we work with, and each of them can have its own specific features and functionality, as well as be customized to meet the specific needs and goals of the client.

Our competencies:

Frequently Asked Questions

Latest works

  • image_web-applications_feedme_466_0.webp
    Development of a web application for FEEDME
    1288
  • image_ecommerce_furnoro_435_0.webp
    Development of an online store for the company FURNORO
    1250
  • image_crm_enviok_479_0.webp
    Development of a web application for Enviok
    989
  • image_crm_chasseurs_493_0.webp
    CRM development for Chasseurs
    1038
  • image_website-sbh_0.webp
    Website development for SBH Partners
    1112
  • image_website-_0.webp
    Website development for Red Pear
    556

Implementing Design Tokens for Web Application Design Systems

In a project with 5 developers and 2 designers, the environment is chaos. One uses #1A73E8, another uses #1565C0, while in Figma the color is called Blue/600. Theming leads to duplicated styles — each new design requires rewriting CSS. The team spends up to 20 hours per week aligning colors and spacing, resulting in 100+ style bugs per month. The solution is implementing Design Tokens: a single source of truth for colors, spacing, typography, shadows, and animations. We have been through this in 30+ projects and know how to avoid the pitfalls. Experience shows that with tokens, change velocity increases 3x and bug count drops by 70%.

Why Design Tokens Are Not Just CSS Custom Properties

Directly replacing #1A73E8 with --color-primary is a variable, not a token. A token carries semantics: --color-action-primary-default, --color-action-primary-hover. The difference is fundamental: when changing the brand color, you change one value in one place, not search all occurrences of 'primary blue' across the codebase. Without tokens, a team of 5 people spends up to 20% of their time on styling: the designer changes Blue/600 in Figma, the developer doesn't know that #1D4ED8 is already used in 12 places under different hex values. Theming requires duplicating styles instead of switching a set of variables. According to Amazon Style Dictionary, tokens reduce overhead by 40%.

How to Implement Design Tokens in a Design System

Implementation starts with an audit of current styles and Figma. Then we design a three-level token model: primitive, semantic, and component. Primitive tokens store raw values without context: color.blue.500: #3B82F6. Semantic tokens attach meaning: color.action.primary.default: {color.blue.500}. Component tokens define specific components: button.background: {color.action.primary.default}. This allows global design changes by modifying one primitive value and makes theming as simple as switching files.

The Three-Level Model Solves Duplication

If you need to change the blue shade, you only update the primitive token, and all components automatically get the new color. Without this model, you would have to edit every button, card, and link individually. This is 10x more efficient than manual CSS updates.

Problem Token Solution Result
Different values for the same color Centralized storage One change for all
Theming difficulties Semantic tokens per theme Switch CSS files
Figma-code mismatch Bidirectional sync Single source of truth

Integrating Tokens with Figma

We use the Tokens Studio plugin for bidirectional sync with GitHub. Workflow:

  1. Designer changes a token in Figma
  2. Plugin pushes the change to branch tokens/update-blue-palette
  3. CI runs Style Dictionary, generates CSS/JS
  4. PR with updated artifacts — code review and merge

Configuring Tailwind for Tokens

In Tailwind 4, tokens are plugged via the @theme directive:

@theme { --color-primary: var(--color-action-primary-default); --radius-button: var(--button-radius); } 

Versioning Tokens

Tokens are part of the codebase. We store them in the design system monorepo and publish as npm package @company/[email protected]. Semantic versioning is critical: renaming a token is a breaking change (major), adding is minor, fixing a value is patch or minor depending on context. We write the changelog readable for designers.

Example token file structure
tokens/ primitive/ color.json spacing.json typography.json semantic/ color.json spacing.json component/ button.json card.json 

Transformation Tools

Style Dictionary from Amazon is the de facto standard. Here's a typical configuration:

// config.js module.exports = { source: ['tokens/**/*.json'], platforms: { css: { transformGroup: 'css', buildPath: 'dist/css/', files: [{ destination: 'tokens.css', format: 'css/variables', options: { outputReferences: true } }] }, js: { transformGroup: 'js', buildPath: 'dist/js/', files: [{ destination: 'tokens.js', format: 'javascript/es6' }] } } }; 

Running npx style-dictionary build --config config.js generates CSS and JS. CSS output:

:root { --color-blue-500: #3B82F6; --color-action-primary-default: var(--color-blue-500); --button-background: var(--color-action-primary-default); } 

A dark theme can be added as a separate set of semantic tokens and compiled into tokens-dark.css.

Work Stages

Stage Duration Result
Audit existing styles and Figma 1–2 days Report on inconsistencies
Design primitive and semantic tokens 2–3 days JSON token schema
Set up Style Dictionary and compilation 2–3 days CSS/JS/SCSS artifacts
Integrate into project 2–4 days Merge request with tokens
Figma integration (optional) 3–5 days Bidirectional sync

What's Included

We conduct an audit of current styles and Figma library, design a three-level token scheme, configure compilation via Style Dictionary, and integrate into code (CSS, JS, Tailwind). We prepare documentation on token usage and train the team (1–2 hours). All work comes with a 3-month warranty on token functionality.

Typical mistakes during implementation: do not mix primitive and semantic tokens in one file; do not use tokens for non-design decisions (e.g., modal z-index); always add fallbacks for older browsers; version tokens with SemVer.

Contact us for a preliminary project estimate — we'll determine timelines in 1 day. Get a free engineer consultation. Order design token implementation and free your team from style chaos.