From Figma to frontend: this is how to streamline your B2B webshop with Design Tokens

Design tokens are increasingly used in the design and development of digital products such as web shops and websites. But what exactly are design tokens? And why are they so valuable, especially in larger, complex projects?

What are Design Tokens?

Design tokens are standardised variables that capture design features, such as colours (primary-color), fonts (heading-font) and margins (spacing-small). Instead of applying these styles manually in each button, title or section, capture them centrally as tokens. This not only makes your design consistent, but also much more manageable and scalable.

Think, for instance, of a primary colour used in dozens of places in a webshop. By defining this colour as a token, you only need to make an adjustment in one place to change the colour site-wide, which is ideal for a rebranding or customer-specific adjustment.

 

In your token definition, you use a number of levels to capture those colours. Tokens are often classified into three categories:

  1. Global tokens
    These are the most primitive values, usually based on a universal scale. They are not context-specific and can be used anywhere in the design. (blue-700)

  2. Alias tokens
    Alias tokens refer to a specific context or function within the interface. They link global values to a meaningful role. (cta-bg-color)

  3. Component-specific tokens
    These tokens are even more specific and apply only within a particular component. They make it clear that a token is only used for that component and often give a name that indicates the function within that component. (button-cta-background-color)

    Tip: By following this hierarchy, you can easily modify tokens in one place (e.g. the global or alias levels) and this will automatically feed through to all components that depend on them.

 

Atomic Design and Design Tokens

Design tokens fit perfectly with the principle of Atomic Design, where an interface is built from small, reusable components. This combination makes designing and developing consistent interfaces much easier.

Atoms
These are the smallest building blocks, such as HTML elements, colours or fonts. They have limited meaning on their own, but form the basis for more complex components.
Examples:

Share this blog

Published on

Last updated on

Need help?

We'd love to help!

Need help?

We'd love to help!

🔥 Also interesting

Questions?

Our specialists are happy to help you.
Call +31 (0) 30 22 70 465 or send an e-mail to info@ecomwise.com

Want to know more about our e-commerce solutions?

en_GBEN