Design3 min read

Design System Tokens: What They Are and Why You Need Them

A token is the smallest part of any design system, and a very important one. In this article, I’ll explain in plain terms what tokens are for and how to use them.

Imagine you’re assembling an IKEA wardrobe. The instructions say: “Take screw A14 and attach it to part F3.” It all makes sense: you grab the right parts and put them together. Now imagine it says this instead: “Well… take a screw and attach it to another part.” Which part? Which screw? There are dozens of them in the box… The same goes for design systems.

Every element seems to be there, but there’s no system, just pure chaos. Mismatched shades, different spacing for every block, inconsistent typography, as if everything was picked at random. As a result, the interface loses its coherence, and the user starts having questions and then starts fuming.

You could say design tokens are standardized LEGO bricks that every other component of your interface and design system is built from. And the cool part is that this system works not just for you, but for the whole team. But it’s not enough to know what design tokens are; you also need to know how to work with them properly.

So What Are They, Exactly?

Design tokens are simple variables that describe the styles of interface elements: colors, sizes, spacing, fonts, shadows and so on. Think of them as “building blocks” that the whole design is assembled from.

Design system tokens illustrated with a text style

Examples of tokens in design systems

For example, instead of typing “#1A73E8” into the fill of every component, you use color-primary, and everyone knows that’s your brand blue. Today it’s blue, but later you decide to freshen up the style and switch to turquoise, and you don’t have to run through a million screens in the project, hunting down where that color is used and replacing it by hand. You change one token and everything adjusts to the new color, thanks to inheritance.

This matters especially in large projects and design systems, where dozens of people work on the interface. Without tokens, everyone can end up doing their own thing: one person’s shadow is 4px, another’s is 6px, buttons are rounded in some places and square-cornered in others. With tokens, everything is standardized, convenient and fast. Because they:

  • Save you from the mess: I’ll say it again. You’ve definitely seen interfaces with several buttons that all seem to be slightly different colors. Or where the line height is just a little different everywhere. That wasn’t a creative decision, just not knowing how to work with a design system. Design tokens solve this: one color, one token. No more “well, it’s almost the same color.”
  • Are perfect for redesigns: need to change the brand color? Before you learned about design tokens, you’d hunt it down and change it everywhere by hand, burning a zillion hours. With tokens, you just update the value of one token, and everything updates itself, everywhere.
  • Make working with developers easier: you say, “This is the primary color.” The dev looks at the tokens and uses that variable. Everyone’s happy, with no extra steps and no questions like “Are you sure you used the right blue?”
  • Make you look like a pro: now you’re not just a designer who “draws pretty pictures,” you’re someone who thinks a couple of steps ahead. Using design tokens shows not only your attention to detail in design, but also solid design thinking.

I know this sounds pretty complicated, and honestly, it is. Design systems are a field of their own within design. Some companies even have entire departments that work on nothing but the design system. And heaven forbid you make a move at a company that doesn’t follow the design system: the design police are already on their way. To avoid arrest, you need to know your way around design systems, so let’s figure out what kinds of tokens there are.

What Kinds of Tokens Are There?

Let me say upfront: there are no hard rules for building design systems or grouping tokens. Every company and team has its own. You can explore open design systems yourself, such as Google’s Material Design or IBM’s Carbon, and you’ll notice that design systems are built on different principles. By the way, our UX/UI Designer Career Track course has an instructor from IBM who works directly with the Carbon design system.

But there are loose conventions for dividing tokens up. Most commonly, there are 3 levels of tokens: base, semantic and contextual. Let’s look at each one in more detail.

Base Tokens

These are the most basic, “raw” values in a design system. Think of them as a paint palette, a ruler and typographic values (line height, letter spacing, typeface and so on): the stuff the interface’s entire visual style is later built from. They also go by other names: global tokens, options, variants or references. The idea is the same, though. They’re just data with no context: the color #1A73E8, a 16px font size, 4px spacing, and so on.

An example of design system base tokens built in Figma

Primitive/base tokens

These tokens don’t depend on where or why they’re used. They’re just the “bricks” that buttons, cards, fields and everything else are later built from.

Semantic Tokens

Now these are about meaning. We give our color #1A73E8 a clear, sensible name, for example color-primary. In other words, we’re saying: “this string of characters with a hash sign is now the button color.”

A Figma screenshot showing design system semantic tokens

Semantic tokens

This approach makes a design system not only more readable but also super flexible. Because if one day you need to swap blue for purple (hey, it happens), you won’t have to comb through the whole project by hand. Just change the value in one token, and everything else updates on its own.

Just one thing matters: semantic names should be clear and easy to understand so they convey the meaning, for example brand-color or secondary-color.

Contextual Tokens

Contextual tokens are the values that describe the exact parameters of a specific interface element. They define exactly how a button, a form, a card or a component state should look. These tokens store individual settings (background color, corner radius, spacing), everything that makes an element unique.

An example of design system contextual tokens built in Figma

Contextual tokens

To keep chaos at bay, these tokens usually reference base or semantic tokens. This helps maintain consistency and roll out changes quickly across the whole system, thanks to inheritance.

Token Hierarchy: Who Does What

I can sense your question: “Why do we need all these levels? Can’t we just name a token brand color and use it everywhere?” You can. But only if you’re designing some tiny landing page. If we’re talking about a large-scale project with hundreds of components, several color themes, different platforms, possibly different brands and a whole team of designers and developers, that’s where you need structure and a logical system.

An example of how tokens are applied to a final component in a design

Token hierarchy, using a button fill color as an example

What’s all this for? This multi-level structure isn’t just for the sake of aesthetics. It helps isolate changes: if you need to change the shade of your primary color, you change it in one place and the whole interface updates. It’s like having a central control panel for your style: nothing breaks, everything’s under control, and your system doesn’t turn into a mess. Tokens and variables are also used to adapt interfaces, and we did just that in one of the lessons of our free Figmaster course.

A still from the lesson “Variables in Figma: A Step Toward a Powerful Design System” in the Figmaster course

Figmaster lesson “Variables in Figma: A Step Toward a Powerful Design System”

Tips for Naming Tokens

Token names are like street names: if they’re weird and illogical, nobody will be able to figure out who lives where. Want your design system to make sense not just to you, but to your team six months from now? Then naming isn’t just words, it’s a map of your visual logic.

Names Should Be Clear

Even if someone opens your project six months from now, the names should still make sense to everyone. Don’t name a token color5, because a week later you’ll have forgotten what it even was. A button color? An error shadow? A tooltip background?

For example, with color5, padding1, text-small, it’s unclear where they’re used, why, and whether they can be changed. But with color-bg-primary, spacing-button-vertical, font-size-caption, you can see right away where the token is applied and in what context.

Stick to a Structure

It’s important to define your naming structure right away and stick to it strictly. Naming structures vary from one design system to another; there are no standardized naming rules, since design systems can serve different goals.

Here’s one example of a naming scheme you can follow: category – element – state. This approach helps keep the project orderly and predictable. A good example: color-bg-primary-hover, spacing-card-padding-horizontal. Names like bgColor1, hovered, paddingx or textBig, on the other hand, I don’t recommend.

A clear structure not only makes teamwork easier, it also saves your own time. Because later you won’t have to remember what you called the padding on that one card on the project’s third screen.

Don’t Tie Names to a Specific Value

Token names shouldn’t directly describe what’s stored inside, like font-size-24px. Because tomorrow you’ll want to bump up the font size, and you’ll have to rename everything in the project.

It’s better to use abstract, more universal names that reflect not the specific value but its role in the interface: color-text-error, font-size-heading-xl, spacing-content-small.

Add Context When Needed

If a token is used in a very specific place, it’s best to say so. Just writing color-primary isn’t always enough, especially if you have ten or so of these “primary” tokens across different components. The name should make it clear exactly where the token is used and what it’s responsible for. That way, future you (or another designer or developer) won’t be left scratching their head: “What does this even belong to?”

For example, if you have buttons with different states, color-button-primary-hover will be much clearer than plain color-hover.

Design Tokens Are All About Order

They’re about being able to manage your interface with ease, pull off redesigns in half a day and not worry that everything will fall apart at the first click. They’re also about confidence. In yourself, in your mockup and in the fact that you’re not just creating, you’re building an entire system.

Subscribe to our regular digest

We'll send you useful articles and news from the world of AI, design, tech, and career growthdesign, and tech

Over 3,000 people already get our useful content