Design Tokens - What Are They and How to Use Them? | Dodonut (2024)

Graphic designers are currently the great creators of visual experiences in the world. That's the reason why the digital design field is constantly evolving. New technologies, methodologies, and other elements complement our work as creatives emerge daily. This is where design tokens come into play. These small design units are revolutionizing how designers create and maintain visual brand consistency across the various digital products and cooperate with front-end dev teams, automating the process and improving communication.

In this article, we will explore the world of design tokens, their purpose, how they work, their importance, how to create your design system, and how we can take advantage of this powerful tool. Let's explore how design tokens make repeatable design decisions quickly and efficiently.

Design Tokens - What Are They and How to Use Them? | Dodonut (1)

Introduction

Let's mention one of the most prominent headaches for web developers and designers. Imagine that you have just delivered to a client the landing page of the website you have been developing for weeks, and the user is delighted with your work. However, it asks you to create a new page with the purpose of selling their products digitally. What is the big problem in this scenario? You must constantly review what you have done on the previous pages to maintain consistency: the size of the buttons, the typography, font size, background color, text color, line height, the color palette, the line spacing, the borders of the platform, etc. These modifications, however small they seem, can be implemented on a website for several days and weeks. Modifying each variant and applying the previous structure is exhausting.

You have two options in this scenario:

1. Check the previous pages to analyze and apply design elements in the new ones.

2. Read this article and discover how to use different design tokens.

Suppose you choose the first option, ok! Good luck figuring out how to make those changes and taking your time to develop new pages.

If you choose the second option, great! Follow me to discover the amazing universe of design tokens.

What are design tokens?

Design tokens are basically repeatable design decisions: name and value pairings that represent visual properties in building interfaces, covering features such as color, typography, shadows, and spacing, among others. The key characteristic of design tokens is consistency across platforms. They are used by developers throughout a product and can be adapted to several formats like web, mobile devices, or applications. Salesforce's design system team, the creators of Design Tokens (the term coined by Jina Anne), define them as:

Following this definition, design tokens are design attributes you package with the purpose of using them over and over again to keep visual consistency in a digital platform.

Like many different companies, Salesforce struggled with the challenge of cross-platform scaling design across multiple platforms, factors, and devices. Design tokens helped them to find solutions for complex problems that appeared in the collaboration of designers and engineers.

Living Design System by Sönke Rohde

Now let's look at how design tokens work and are used. Let’s take a button as an example. This element consists of several parts, each of which is represented by a design token. Those elements allow the developer to build and modify the button's visual characteristics globally.

The button itself is the atom, and the design decisions that define it include margin, colors, border, radius, padding, font weight, font family, and more.

Design Tokens - What Are They and How to Use Them? | Dodonut (2)

Why use design tokens? Benefits.

Design tokens play a crucial role in improving web design efficiency. These powerful tools enable us to establish a centralized system for managing and maintaining design attributes by creating a token system based on scalability, structure, practicality, and efficiency.

With design tokens, designers can easily update and reproduce design changes throughout the project, eliminating the tedious need to manually update elements individually. They save time and effort and ensure flawless visual consistency throughout the design process.

We can distinguish 4 main advantages of design tokens:

  • ConsistencyMaintaining consistency is easy when you're the only designer and creator of a whole project. However, in real scenarios, we usually work head-to-head with other designers and developers on the same project. That's a challenge because the production could have varying versions of some elements. Example: A "subscribe" button with different shades of blue on each page.
  • EfficiencyWith design tokens in place following a system, you'll witness a remarkable boost in delivery speed. No more precious time wasted on unnecessary decisions. Forget about deciding between +1000 fonts, colors, spacing, and more. Design Tokens are built to simplify this task.
  • Easy to applyImagine that during a project, a new designer is joining the team. Updating the new member with the whole process can be very demanding. But don't worry. Here is the design token's system to save the day, as it can simplify how design decisions are informed and applied.Design tokens are recommended to use when the design team is constantly growing. Thanks to them, newcomers will quickly grasp the company's design standards and practices. The learning curve becomes less steep, and they can seamlessly dive into their work, applying the appropriate look and feel, embracing the philosophy, and adhering to the core design principles.
  • DocumentationWorking with design tokens makes life easier for both designers and developers. It simplifies maintenance and provides reliable documentation, representing anything defined by design used in place of hard-coded values. You'll have a crystal-clear understanding of what's in the system, why it's there, and how it functions.

Creating a design token types and system

Let's solve the big question: how are design tokens created? The success of this tool is based on how you build them and where. Deepak Choudhary from UX Planet and Yana Ballantyne from Inside Design explains in a simple way how these elements are created.

First of all, design tokens are stored in a Single Source of Truth (SSOT), such as InVision DSM, which provides a user-friendly interface to create and manage your centralized design tokens. When you're ready to implement a change, you can execute a modification and design platform-specific values for tokens using tools like Amazon's Style Dictionary or Salesforce's Theo. These platforms streamline the process and ensure that your design tokens are transformed into the appropriate values for the target platform or technology.

In Figma, we can use a powerful plugin called "Tokens Studio for Figma," which lets us save all the tokens & merge color + text styles from the design tool into the plugin. Then, we have several options to sync tokens.

1. The most efficient one - connection with GitHub, GitLab, etc. Basically, we can connect our account with one of the tools that our developers use. Then we can merge the tokens into their branch. Once they use the .json file we have sent into, e.g., GitHub, they can load it into the project. In this case, when we update existing tokens or add a new one, we can simply update the previous file.

2. .JSON file export, the developers can use the raw file which was exported from the Figma plugin.

When implementing design tokens, you can create them based on the desired level of abstraction in your system architecture. Design tokens allow for a customizable approach that perfectly aligns with your specific design and development needs. Typically, you can choose from up to three levels of abstraction, each offering its own advantages and considerations to optimize your token implementation.

Design tokens are represented with specific primitive values. For example, color as a HEX or RGB value, opacity as a number, and animation ease as Bezier coordinates.

Design Tokens - What Are They and How to Use Them? | Dodonut (3)

Let's check different types of design tokens, depending on their complexity:

First level:

At the first level, we have the main tokens that form the foundation of the entity. You can keep things simple by creating tokens with a basic structure. These tokens consist of key-value pairs that define essential design attributes like:

  • Grid: Defines the grid system and layout structure.
  • Icons: Represents the collection of icons used throughout the design.
  • Shadow Levels and Opacity: Specifies various elements' different shadow levels and opacity values.
  • Color Composition: Includes the primary color, secondary colors and derivatives of the main color.
  • Fonts: Consists of the main and secondary font options and their respective styles and variations.
  • Spacing, Breakpoints, Transitions, Stacking Contexts: Determines the spacing between elements, breakpoints for responsive design, transitions for smooth animations, and stacking contexts for layering elements.

These tokens form the core building blocks that provide consistency and flexibility throughout the design system.

Design Token Example:

primary-color = #004C97, secondary-color = #05C3DE

Second level:

In the second level, we define the high-level structures associated with the tokens from the first level. This is where we make design decisions that relate to the visual aspects of the general interface elements like:

  • Primary Color: This is specifically defined for the main context links, providing a consistent visual representation.
  • App Main Text Font: We establish the main font choice for the text used throughout the application, ensuring a cohesive typographic style.

By defining these entities at the second level, we further refine and enhance the visual nature of the interface, maintaining a cohesive and harmonious design language.

Design Token Example:

LEVEL 1: red-500 = #DC2323

LEVEL 2: primary-border-color = {red-500}, primary-icon-color = {red-500}

Third level:

At the third level of the design token hierarchy, a world of possibilities opens up for more complex design systems. This level deepens into the intricate details of each component in the user interface, where specific tokens closely relate to the second-level tokens, defining particular cases within the interface. It introduces an additional layer of component tokens, providing the opportunity to limit contextual usage and create dynamic theming and color modes. This higher level of abstraction empowers designers with greater control over individual design elements within different components, making it ideal for projects that prioritize customization and adaptability.

Design Token Example:

LEVEL 1: purple-500 = #CC8899

LEVEL 2: primary-background-color = {purple-500}

LEVEL 3: button-primary-background-color = {primary-background-color}

This orchestration of tokens is crucial in creating a consistent and scalable tokenization framework that can evolve over time. One notable example of this approach can be observed in the context of Salesforce's Lightning Design System, where design tokens play a significant role in maintaining a cohesive and adaptable visual system.

As you move up the levels of abstraction, things may become more intricate. But don´t worry because increased complexity also brings enhanced flexibility, scalability, and the ability to meet diverse design requirements. The choice of which level to adopt depends on your project goals, team dynamics, and the complexity you want to apply to your design system.

What is the difference between global tokens and alias tokens?

Global tokens and alias tokens are both types of design tokens used in design systems, but they serve different purposes:

  1. Global Tokens:Global tokens directly represent a specific value or attribute. They are standalone tokens with a single value, such as colors, typography styles, spacing values, or breakpoints. Global tokens provide a centralized and consistent way to manage and apply these design attributes throughout a project. They are typically defined and used directly in the design system and are easily accessed and applied across different components and styles.

Design Tokens - What Are They and How to Use Them? | Dodonut (4)

  1. Alias Tokens:Alias tokens are references or aliases to existing global tokens. Instead of representing a specific value, alias tokens point to or inherit the value from another global token. Alias tokens are helpful when creating variations or alternate names for the same design attribute without duplicating the actual value. They provide flexibility and enable designers and developers to create different aliases or aliases with modified values for specific use cases or variations.

How to implement design tokens effectively?

Now you know what design tokens are, how to create a design token system, and the importance of these elements in the design of various platforms. However, do you know how to implement design tokens effectively?

Implementing design tokens requires careful consideration of both design and development aspects. To improve the process of successfully implementing object style changes and creating for them design tokens, follow these few design tokens tips:

  • It is essential to ensure that the library or UI kit used in tools like Sketch or Figma remains synchronized with the code provided to developers, containing components, patterns, templates, and more.
  • Successful implementation relies on constant communication and collaboration between design and engineering teams. Designers should diligently update the design library with any changes or updates on the design tokens, ensuring developers can access the most recent versions. Developers, in turn, should apply these design tokens to maintain visual coherence and consistency when implementing components in the codebase.
  • Establishing a clear and efficient workflow is crucial for smooth collaboration between product teams. Regular meetings, detailed documentation of the design tokens, integration of version control tools, and open communication channels all play vital roles in this process.
  • Furthermore, establishing guidelines for token values and token's naming, structure, and documentation can encourage a shared understanding and facilitate effective token usage throughout the team. To scale and find tokens easily, the naming convention must be predictable.

Design tokens step-by-step process:

To make it crystal clear, let’s sum up the whole process and create a little guide through design tokens implementation:

  1. The designer makes a style update in a design tool.
  2. A design tokens generator automatically updates a centralized repository by generating platform-specific files (CSS, JSON or YAML).
  3. Engineers fetch the updated repository, incorporate any new tokens, and automatically update the project styles.

Conclusion

In conclusion, design tokens have revolutionized the digital design industry by providing designers with a powerful tool to achieve visual consistency and efficiency across projects. Designers can now easily create and manage a library of design tokens that can be used across different platforms and devices, such as brand colors, typography, spacing, and more.

Through active communication between designer-developer, creatives actively bridge the gap between design and development, fostering a smooth integration of visual and technical aspects. Design tokens have become indispensable in the designer's toolkit, revolutionizing how we approach graphic design and enabling us to shape the future of visual product experiences.

Overall, design tokens represent a major step forward in design thinking, providing a framework for creating more consistent, efficient, and adaptable design systems that can be used across various platforms and products. As the demand for responsive and adaptive design grows, design tokens will become even more essential in ensuring flexibility and unity across all products and seamless user experience across different screen sizes and devices.

Design Tokens - What Are They and How to Use Them? | Dodonut (2024)

FAQs

What are design tokens and how to use them? ›

They're ultimately a communication tool: a shared language between design and engineering for communicating detailed information about how to build user interfaces. Tokens consist of values needed to construct and maintain a design system, such as spacing, color, typography, object styles, animation, and more.

Where do you store design tokens? ›

Typically stored in JSON files due to their flexibility, these tokens can be transformed and integrated across various platforms through a multitude of existing transformation packages. With a robust foundation of reusable tokens encapsulated in JSON files, the entire design system is constructed.

What is the difference between design tokens and styles? ›

Styles vs Tokens

Styles and tokens are both ways to store and manage design elements in Figma. However, they have different strengths and weaknesses. Styles are more flexible and can be used to store a wider variety of values. For example, you can use styles to store colors, fonts, spacing, and even animations.

What are the value of design tokens? ›

Each design token has a unique name and its corresponding value. This name/value pairing is similar to a dictionary data structure found in engineering, where a key is associated with a value, and the key/value pair can be used to store and retrieve data.

What is a token and how is it used? ›

In general, a token is an object that represents something else, such as another object (either physical or virtual), or an abstract concept as, for example, a gift is sometimes referred to as a token of the giver's esteem for the recipient. In computers, there are a number of types of tokens.

What can tokens be used for? ›

Tokens have a huge range of potential functions, from helping make decentralized exchanges possible to selling rare items in video games. But they can all be traded or held like any other cryptocurrency.

Are design tokens necessary? ›

Why are tokens important? Tokens enable a design system to have a single source of truth. They provide a kind of repository for recording and tracking style choices and changes.

What are the best practices for design tokens? ›

Be descriptive: Use names that are specific and informative, reflecting the token's purpose and value. Avoid using generic phrases such as “color1” or “spacing2.” Make use of context: Include context about the token's usage, such as the component to which it applies or its role in the design system.

What can I use instead of design tokens? ›

The best alternatives to Figma Design Tokens are Figma, Specify, and Airtable To Figma.

Does Figma have design tokens? ›

Gives you the ability to use Design Tokens that can be used for a whole range of design options, from border radii or spacer units to semantic color and typography styles that are able to reference other tokens.

Are design tokens CSS variables? ›

Design tokens are a method of abstracting and organizing the design elements of a system into usable and uniform values. By utilizing CSS variables, these tokens promote a more modular and manageable approach to styling for web development.

How to build a token system? ›

How to Create a Token Economy System
  1. Break the day down into smaller chunks of time. ...
  2. Choose up to three behaviors to address at one time. ...
  3. Create an appealing reward menu with a variety of items. ...
  4. Frame the desired behaviors in a positive way. ...
  5. Physically hand a token to your child whenever he earns one.
Nov 2, 2022

Who came up with design tokens? ›

The term 'design token' was first coined by Jina Anne at Salesforce in 2014. They can represent a wide range of properties and link ('alias') to other tokens, making them scalable by nature.

What is theming with design tokens? ›

Themes are how we switch color schemes and styles everywhere using a single set of tokens. Light mode, dark mode, and high-contrast mode are all examples of theming. Non-color themes are also possible: think cozy/comfortable/compact views, reduced motion, or custom typography styles.

How were tokens used? ›

In some towns and cities, tokens were issued by local traders to be used in place of small coinage at their and other businesses in the area.. Trade tokens were coin-like objects distributed by merchants and used in place of regular coins usually “good for” something like “5 cents” .

How do you use digital tokens? ›

Redeeming a digital token
  1. Click on the redemption URL which will redirect you to a different website for Cardholder Services.
  2. This URL would've been provided to you by your program or it can be found in the reward email that you received.
  3. Select either a virtual or physical prepaid card.
Jan 17, 2024

Top Articles
B2C Marketplaces
Top 10 States with Cheapest Gasoline Prices [January 2024]
Is Sam's Club Plus worth it? What to know about the premium warehouse membership before you sign up
Craigslist Monterrey Ca
Craigslist Campers Greenville Sc
Stadium Seats Near Me
Summit County Juvenile Court
Google Sites Classroom 6X
Chase Bank Operating Hours
Find All Subdomains
Poplar | Genus, Description, Major Species, & Facts
Flights to Miami (MIA)
What's Wrong with the Chevrolet Tahoe?
Nwi Police Blotter
Produzione mondiale di vino
[PDF] INFORMATION BROCHURE - Free Download PDF
Inevitable Claymore Wow
Diablo 3 Metascore
Available Training - Acadis® Portal
Walmart stores in 6 states no longer provide single-use bags at checkout: Which states are next?
SF bay area cars & trucks "chevrolet 50" - craigslist
ZURU - XSHOT - Insanity Mad Mega Barrel - Speelgoedblaster - Met 72 pijltjes | bol
Hdmovie2 Sbs
Phoebus uses last-second touchdown to stun Salem for Class 4 football title
Ac-15 Gungeon
Defending The Broken Isles
Mosley Lane Candles
Redbox Walmart Near Me
Landing Page Winn Dixie
15 Downer Way, Crosswicks, NJ 08515 - MLS NJBL2072416 - Coldwell Banker
Envy Nails Snoqualmie
Σινεμά - Τι Ταινίες Παίζουν οι Κινηματογράφοι Σήμερα - Πρόγραμμα 2024 | iathens.gr
Pitco Foods San Leandro
Skip The Games Ventura
SOC 100 ONL Syllabus
The Vélodrome d'Hiver (Vél d'Hiv) Roundup
888-822-3743
Sofia With An F Mugshot
Kutty Movie Net
Unitedhealthcare Community Plan Eye Doctors
Penny Paws San Antonio Photos
Hello – Cornerstone Chapel
3367164101
Iron Drop Cafe
Craigslist Charles Town West Virginia
Freightliner Cascadia Clutch Replacement Cost
Fresno Craglist
Wrentham Outlets Hours Sunday
Assignation en paiement ou injonction de payer ?
Where Is Darla-Jean Stanton Now
Die 10 wichtigsten Sehenswürdigkeiten in NYC, die Sie kennen sollten
Latest Posts
Article information

Author: Duncan Muller

Last Updated:

Views: 6174

Rating: 4.9 / 5 (59 voted)

Reviews: 82% of readers found this page helpful

Author information

Name: Duncan Muller

Birthday: 1997-01-13

Address: Apt. 505 914 Phillip Crossroad, O'Konborough, NV 62411

Phone: +8555305800947

Job: Construction Agent

Hobby: Shopping, Table tennis, Snowboarding, Rafting, Motor sports, Homebrewing, Taxidermy

Introduction: My name is Duncan Muller, I am a enchanting, good, gentle, modern, tasty, nice, elegant person who loves writing and wants to share my knowledge and understanding with you.