Design Tokens: How to adopt Design Tokens from 0 to 1

Miaomiao_Liu
5 min readJun 26, 2022

Design tokens are shared languages between Designers and Developers to keep their works connected and consistent.

What’s your collaboration with Designers/Developers look like?

Jan Six Design System Talk (Config 2022). Twitter: @SIX7
Painful collaborations — Jan Six Design System Talk (Config 2022). Twitter: @SIX7

👩🏻‍🎨

As a designer, I create UI styles in Figma. Once I decided to update a colour value from one to another, I can only change the value in Figma. After I have done the update, I will go to Slack and report this change to my Develop Team and announce these changes in Figma.

🧑🏻‍💻

As a Developer, I create UI styles in coding files. Once designers create UI styles, I just inspect the CSS codes in Figma and hardcode the styles in my coding files. I assume UI styles won’t change often as it is chaotic to find a small line about radius . When the designer update a colour value they tell me in Slack, I will go to Figma → find the changes → open VS code → fiiiiinnnnnd the colour codes→ update → push to Github → create pull request …

Slack as the source of truth — Jan Six Design System Talk (Config 2022). Twitter: @SIX7

Working in this way, designers and developers were not connected. Therefore, both sides spent a lot of time on getting news → finding sources of truth → keeping UI styles in sync.

Guys, we can make it very easy and efficient

— How?

Depending on the situation of your team, you may find a level of strategy is more useful for your team.

Level 1: keeping Design and Implementation connected using Design Tokens

Use Design tokens to share the same UI language. — Jan Six Design System Talk (Config 2022). Twitter: @SIX7

The Marvellous Design Token

Your parents want to show you and your siblings are from the same family but with unique names. They gave all of you different first names with the same family name.

By adopting Design Token, we connect the UI styles in Figma and the UI styles in code files by using the same tokens (names/languages), because they are the same person. They just need to travel from Figma to VS code from time to time.

How Design tokens work in CSS. — Jan Six Design System Talk (Config 2022). Twitter: @SIX7

Let’s take a closer look at what is Design Token

Design token is used for Designers to control the Styles, i.e. colours, radius, typefaces, spacings etc.

Developers use tokens as the names of style variables.

Finally, the implementation of applications shows the UI styles.

For example, a Button as a component is made up of an icon and text, both the elements inside one Button have attributes: colours, size, and typeface.

When we use Design tokens:

Tokens store the values of colours and typeface of the elements inside the button, they can be reused in Figma as well as CSS code (or other code files).

You may think Design tokens are just names?

You are right, but you are also wrong.

In Figma, they are UI styles.

In code files, they are variables.

You can reuse the UI styles in some other places.

For instance, a component’s surface colour is #FFD953 , you can reuse {token.sys.color.teriary } to keep colours connected and in sync.

e.g. Design token: token.sys.color.teriary

Jan Six Design System Talk (Config 2022). Twitter: @SIX7

Read more about Design tokens in Material UI

level 2: Designer push UI updates to Github directly from Figma

Jan Six Design System Talk (Config 2022). Twitter: @SIX7

It really happens…

But, you should make sure that you have already implemented the #Level 1 in your team.

And, the UI languages are collectively created by Designers & Developers from the start or NOW!

Then, you can uplift your team to the next level. I.e., this level :)

The workflow you want to have

Jan Six Design System Talk (Config 2022). Twitter: @SIX7

Basically, Designers update UI styles in Figma (that means, Figma is the source of truth).

Then, they push the updates to their branches on Github. They can make this magic thing happen in Figma by using the Figma Tokens plugin or Figma REST API.

Finally, the Designer creates a pull request and waits for Develop team to validate the changes and adopt the updates in code files.

The checking flow really depends on your team’s working fashions.

Jan Six Design System Talk (Config 2022). Twitter: @SIX7

How does it look like?

#Step 1 → update Local Styles

Update colour yellow

#Step 2 → Push to Github

Push in Github

#Step 3 → Create a pull request

Create Pull Request

Then, you can create the request on your Github :)

Values to adopt the Design Tokens

  1. Boost teamwork efficiency
  2. Improve outcome quality
  3. Work harmoniously
  4. Maintain consistency
  5. Build seamless connection between the Design Team and Development team

Read more about how to use Figma Tokens from:

#Jan Six presentation in 2022FigmaConfig

# Design tokens in Figma by Jan Six:

🌈 Find Design system experts on Twitter:

@jina @six7

☘️ Thanks for reading, hope we improve together.

--

--