Back

Tokenization

Tokenization in the Design system Europa

What are Tokens? #

Design tokens are all the values needed to construct and maintain a design system — spacing, color, typography, object styles, animation, etc. — represented as data. These can represent anything defined by design: a color as a RGB value, an opacity as a number, an animation ease as Bezier coordinates. They’re used in place of hard-coded values in order to ensure flexibility and unity across all product experiences.

Essentially, a design token is a design decision: a pairing of the same code and visual properties—design elements you use over and over again in your products—packaged in a format that’s deployable across all platforms.

For example, let’s say your team decided your brand’s primary color is #276EE5. You could create a design token of the following: color.primary = #276EE5 (The token’s name is color.primary, and its value is #276EE5.)

Why they are important? #

The design system is your land, and your design tokens are the language people use to communicate design decisions with each other.

The difference between design tokens and any other design variable is that they are an abstraction layer that makes them platform-agnostic.

Design tokens help you reach:

Tokens forms the base for your Atoms which gives you the power to add/edit/upgrade any atom, molecule, organism etc.

Tokens description

Example #

Token implementation in a Design system

Current practice #

As a front-end developer, I assume designers are responsible for taking design decisions. Updating a color, a font-size or any “core style” and seeing the result in whatever platform should be effortless for them. Unfortunately, this is not currently the case.

Let’s say a color needs to be updated. The current workflow would look like this:

  1. The designer updates the color in the design tool.

  2. This design update is shared to the developer.

  3. The developer updates the value in the code.

  4. The designer can see the result in a development environment.

This workflow suffers from several pitfalls:

This workflow can be optimized! 💪

Figma Tokens to the rescue #

Close your eyes and imagine a world where a design tokens generator would be integrated in design tools.

Using a combination of Figma Tokens and Style Dictionary you can automate this process.

How? #

Tokens structure

Steps #

Figma tokens overview
Figma tokens with Github

The tokens/Json file would be pushed to the corresponding repo and the developer just need to pull that changes and you are good to go.

Code would be Integrated with Style Dictionary which would spit out CSS, iOS, Android format tokens.