Figma Variable Naming & Creation: Best Practices for Design Tokens

Luke Murphy
Written by Luke Murphy
Jun 26, 2025

In Part One, we looked at how to structure your variables into their primitive and semantic layers, and how to approach things like modes and collections when setting up your variable architecture in Figma. Now it’s time to get a bit more practical. This article is a how-to guide on setting up your variables to be scalable, maintainable, and developer-friendly, whether you're working with one brand or ten, one theme or three. We’ll talk about naming conventions, how to structure different types of variables, and why a bit of up-front thinking will save you loads of time later on.

This isn’t about setting up tokens in code (yet) – that’s coming in the next part. This is about making your variables in Figma work for you first.

Variable naming - primitives

Primitives are your raw values – your ingredients. These should be:

  • Agnostic to brand, theme, or component use
  • Named in a way that works for both designers in Figma and developers in code
  • Flexible enough to be transformed into any platform’s design tokens later

Think of them as “just the values.” You shouldn’t be making decisions about light or dark, brand colours, or how things are used here. That happens later.

Let token transformation tools like Style Dictionary or Supernova do the platform-specific work later, especially when it comes to string and number variables.

One thing to be cognisant of is a way to structure. Splitting your primitive variables into folders makes things easy to navigate, and gives rudimentary context to what these values should be used for. We’ll get into how complicated you can make these in a bit, but for now, here’s a laundry list of what you could include (warning this list is not exhaustive):

    • color/[colorName]/[rampValue] eg. color/blue/500
    • color/opacity/[opacityValue] eg. color/opacity/50
    • spacing/base/[rampValue] eg. spacing/s
    • border/width/[rampValue] eg. border/width/50
    • border/radius/[rampValue] eg. border/radius/50
    • typography/font/[family] eg. typography/font/MonoSans
    • typography/weight/[weightValue] eg. typography/weight/500
    • typography/size/[sizeValue] eg typography/size/6
    • typography/lineheight/[rampValue] eg. typography/lineheight/tight
    • typography/letterspacing/[rampValue] eg. typography/letterspacing/tight
    • typography/measure/[rampValue] eg. typography/measure/longer
An example of how primitive variables might set up

Hiding your primitive variables from users

One big piece of advice is to hide your primitive variables in Figma. You can do this by either having them in a separate unpublished library, or more commonly, you can select which collections to unpublish in Figma. This means that designers won’t be tempted to reference the raw tokens, and will generally make using variables in Figma files way more user friendly.

Key takeaways

Primitives should be neutral and context-free
Keep them agnostic of brand, theme, or component so they can scale and adapt without renaming your variables.

Design for Figma, not for tokens
Focus on making variables usable in Figma first. Platform-specific token names and structures come later via tools like Style Dictionary.

Use folders to add clarity without adding meaning
Organise your primitives with a clear folder structure (color/blue/500, spacing/base/s) to make navigation easier without locking in semantics.

Hide your primitives
Your primitives don’t need to be surfaced within your Figma libraries. Set them to be unpublished in Figma.

How to handle color primitives

Stick to descriptive hues

When naming color variables, the rule of thumb for me is to make the color names as descriptive and simple as possible. If you can get away with using root color names like red, pink, blue etc. do it, as there’s little ambiguity around what ‘blue’ or ‘red’ mean. However, sometimes this is going to be too limiting. Just try and keep it to color names that people are likely to know (what even is chartreuse? What does ‘neutral’ even mean as a color?).

Using ramps for the individual variables

On the individual colors, I like using ramps to define, as it adds a level of scalability if you’re wanting to use shades and tints of specific colors. I feel like it’s pretty common these days to use 100-900, as it gives flexibility to go simple (using a few like 100, 300, 500, 700, 900), but can also allow up to 999 different variations (but why would you?). Personally, if there are colors I know won’t have shades or tints, I stick them in a color/base/ folder. Currently I only use this for black, white and red, because I don’t want to have shades of those, and I want it to be clear when using those that it is a single color.

Talk to your developers

Your developers probably already have some variable naming principles when it comes to colors. As much as we love to name things, it’s probably a good idea to make sure you’re aligned so you’re not outputting things they will transform anyway.

Key takeaways

Use clear, familiar color names
Stick to simple, recognisable hues like blue or red. Avoid abstract or confusing names unless they’re absolutely necessary.

Adopt ramps for scalability
Use stepped scales like 100–900 to give you flexibility and future-proofing when working with tints and shades.

Align with your developers early
Color naming often already exists in code. Syncing on conventions up front avoids unnecessary renaming later.

How to handle spacing primitives

Spacing is usually much simpler to manage than colours, but you still want to set it up right. One hard and fast rule is to use solid number values like 8 as your variables values. This allows you to not only use them across multiple areas in Figma, but then gives you more flexibility with how you transform them when they get to tokens.

Figure out your scale

There are multiple ways to approach scale. We advise keeping it as simple as possible, while still fitting within the scope of what people build within the system. At zeroheight, we use a number based ramp from 0 right up to 1250. Personally, I think if you can get away with t-shirt sizes like xs, md, lg etc. you should use them, because I find them more descriptive. It usually comes down to how many options you need to provide and how much flexibility you need.

What about gap, margins, padding?

Again, personal preference, but I love using a scale that can be reused! We use an 8px scale for all of our spacing, with the variable naming reflecting the end value. So 8 = 100, 16 = 200, 4 = 050 etc. We then use this for everything from margins, to padding, to vertical rhythm, to gaps. There is even an argument that you could use this scale to power your type spacing as well. In the end, it comes down to the level of flexibility you need in your system.

What about width, height and breakpoints?

This seems to be slightly controversial, as there’s a lot of debate as to whether you include these in your system or not. Especially with device fragmentation on mobile, as well as the responsive nature of the web, it makes sense to not enshrine these in your variables that will be transformed into tokens. However, you could set up a utility collection that is purely for use in Figma, so you can at least have some level of consistency, especially when it comes to breakpoints.

A simple spacing scale in a primitives collection

Key takeaways

Use number values to keep things flexible
Solid numeric values (like 8, 16, 32) make your spacing primitives reusable across Figma and easy to transform into platform-specific tokens.

Pick a scale that fits your system's needs
Whether you use numbers or t-shirt sizes, keep it simple and consistent. Choose a ramp that gives you just enough flexibility without overwhelming your team.

One scale can do it all
Reuse the same spacing scale across margins, padding, gaps, and even type rhythm to keep your system coherent and maintainable.

How to handle typography primitives

Typography setup is where things can get messy – especially when people try to bake usage into primitives. Typography is also one of those areas where token transformation is… fun. Every platform uses different ways of defining things, and there are choices to make even within specific platforms.

Keep your typography primitives unopinionated

When naming your typography variables, there are a few choices. If you’re dealing with a single brand, and a small set of possible fonts, you could name your fonts something like typography/family/sans, typography/family/serif, and typography/family/mono. However, if you’re dealing with more fonts, or multiple brands, you’ll probably want to keep it less opinionated. In this case, I’ve often found the best way is to just name your families, such as typography/family/DMSans, or typography/family/Fraunces. Sure, this means that people need to know which font to use, but you’ll also be setting your fonts in the semantic layer too.

When setting up variables to use with typography, the best thing to do is to keep font-family as a string and everything else as number. Some folks use strings like bold or semibold for weight, but if you use number values like 400 and 700, figma can interpret these to their closest approximation, and it gives you more control across fonts. One note is to avoid naming via intent (eg. h1 or body-m), as you’ll be defining these at the semantic level.

How do I deal with fallbacks?

One of the things that aren’t dealt with well in variables is font fallbacks. It’s also one of those things where different platforms are wildly different with the way they deal with font fallbacks. At this point, I’d suggest just defining your fallbacks when you transform your variables into tokens on the code side.

Keep color out of typography variables

One thing that confused me at first was how people separate interests in tokens. Not all of the things you’d usually associate with typography should be included in typography variables. The main culprit here is color, where you should be defining this within the scope of color at a semantic level, instead of typography. The only other thing that you might want to keep out of scoping within the typography variables is font size if you’re relying on a base scale for everything.

Example set of primitive typography tokens

Key takeaways

Keep typography primitives unopinionated and flexible
Avoid naming by intent. Use neutral labels like typography/family/DMSans and numerical values for weight, size, and spacing to keep things cross-platform friendly.

Let the semantic layer define usage, not the primitive
Save names like h1 or body-m for your semantic tokens. Primitives should just describe the raw type values.

Don’t include colour in typography variables
Colour belongs in the colour system, even if it's applied to text. Keeping it separate gives you more flexibility and consistency.

Naming your semantic variables

Semantic variables are where you start adding meaning. They talk to the intent and context of what they’re being used for, instead of just referencing raw values.

Start with base-level semantics

One of the first things that we do is set up all of our base level semantics. These cover common usage of a lot of the primitives, including color, typography, spacing, border etc. One of the key considerations here is you want the naming to reflect the context or intent of what you’re trying to convey. Because you might be setting up brand or mode theming here, you also want them to be abstracted at the right level.

Here’s a sample of what’s included in in ours as a reference:

      • color/base/brand/primary/default
      • color/base/brand/primary/darker
      • color/base/brand/primary/lighter
      • color/base/background/primary
      • color/base/background/highlight/default
      • color/base/background/highlight/hover
      • color/base/border/primary
      • color/base/border/disabled
      • color/base/text/neutral
    • typography/base/family/heading
    • typography/base/size/h1
    • typography/base/weight/heading

Again, the intention here is to have it be as complex as is necessary. Getting the right balance for what works now and what will scale later requires opinions and decisions, but our advice is to always err on the side of simplicity.

Remember here that aliasing is your friend. If you’re confident that the border color will almost always be the primary brand color, aliasing it to color/base/brand/primary/default is more maintainable than referencing the root primitive.

Example set of base color semantic variables

Naming component variables

Whether you split them out in another layer or not, it’s almost always worth defining component variables at some level. Even if these are at a high level (like button, input etc) or super specific, these allow you to build a variable and token structure that is super maintainable.

To start with in our system, we took the most common elements and made sure we had tokens covering them off at a high level. We also tried to find components that were the most common to diverge, to try and codify opinions around these. These were things like inputs, buttons, menus, tooltips, cards and navigation.

When it comes to naming these, it’s relatively straightforward. Again, make sure you’re thinking of intent more than weird naming quirks. Something like:

    • color/input/text/message/helper
    • color/input/text/message/error
    • color/input/text/label/default
    • color/input/text/content/default
    • color/input/text/content/placeholder
    • color/input/text/content/disabled
    • color/input/border/default
    • color/input/border/active
    • color/input/border/disabled
    • color/input/background/default
    • color/input/background/disabled

As you can see, things can get quite verbose quite quickly. The trick is to include what’s needed now, and what might be needed in the near future. You can always extend it out later. Audit and map out the states and variants you actually use, and try and pair it down to that.

Don’t get too complicated

It feels like unnecessary repetition, but really try and keep it as simple as possible. Remember, the more variables you add, the more complicated it can get for the end users. I know some systems for big companies that have a really tight, simple set of variables to use, because they know that flexibility is key. For others, having endless sets is necessary because there are communication issues across really large, distributed product teams.

One rule of thumb that Stu Robson said that stuck with me is that “the quantity of design tokens there are is a direct correlation to how well your organisation communicates”. I think there’s definitely some truth in this…

Example set of component variables for inputs

Scope your variables

One way to make the experience more enjoyable for variable consumers in Figma is to spend some time scoping your variables. This allows you to specify what properties your variables can be used for. This makes navigating variables when assigning them much easier, as you’re not traversing all the variables to find the one you need. One thing to note is that currently this scoping is only relevant to Figma, and won’t be imported into zeroheight.

Key takeaways

Use semantic variables to express intent, not raw value
Naming should reflect the role a value plays (like background/primary, text/neutral) so it's easier to theme, maintain, and scale.

Alias wherever possible to improve maintainability
Referencing other variables (like brand colors) instead of raw primitives makes future changes easier and avoids duplication.

Scope and simplify your variable set
Keep your variable set only as complex as it needs to be, scope variables to properties in Figma for better usability, and don’t over-engineer. Clarity beats cleverness every time.

Luke Murphy
Luke Murphy
Luke (they/them) is Lead Design Advocate @ zeroheight. When they’re not enthusing about DesignOps, they are playing in bands, drawing silly things or writing academic articles about Josie and the Pussycats.
Try zeroheight
The design systems platform that keeps teams and agents in sync
Start for free
Share this post