Design Tokens Automation: Getting Figma Variables into zeroheight

Luke Murphy
Written by Luke Murphy
Jul 17, 2025

In part one we mapped out a solid primitive/semantic architecture, and in part two we named and created those variables so they’re friendly to both designers and developers. Now it’s time to automate those Figma variables, and get them into code using zeroheight!

This how-to picks up the baton and shows you how to:

  1. Sync your Figma variables into zeroheight as token sets
  2. Document and reference those tokens in your styleguide
  3. Wire up an automated pipeline that sets up a pull request with production-ready code every time you make an update to your variables

By the end of this, you should have a single source of truth that flows from Figma all the way to production!

Getting your Variables into zeroheight

Before we start, it’s probably worth noting that Variables and Design Tokens are technically different things. You’ll always need some way to export them out of Figma so they’re usable in your code. zeroheight does this for you by syncing them as token sets in zeroheight. Once that connection is made, and you get your variables into zeroheight, you’ll only need to click a single button to update them. Even better, after that you can set up automation!

Setting up the initial sync

To sync variables to zeroheight, you’ll need to use the zeroheight – Variables Sync plugin, which allows you to create the token sets in zeroheight. If you use SSO for your zeroheight instance, you’ll need to also put a token in, but the plugin will step you through this process. If you need more help with this, there’s an indepth help article over here.

The Tokens Manager in zeroheight

To see your tokens in zeroheight, you need to log in to your dashboard and click ‘Tokens’ in the left sidebar. From here you’ll see all the tokens sets you’ve created, and when you dive into a token set, you’ll see all your collections across the top, and your modes in each individual collection.

Updating your tokens in zeroheight

If you change anything in Figma, all you need to do is hit the ‘check for changes’ button in the plugin, and you’ll be able to see if any of your tokens need updating. If they do, it’s as simple as hitting ‘update and publish’. One thing to note is that at the moment, sync is currently one-way. Edit upstream in Figma, downstream in zeroheight stays read-only. Treat your Figma file like an API and keep its naming stable.

📚 Key takeaways

  • Treat variable names as contracts—change them only in a new major version.
  • Keep one “tokens” file; forks create duplicate token sets.
  • Re-sync often to avoid merge-conflict-style surprises.

Documenting your tokens in zeroheight

Design Tokens block

The design tokens block is a big ol’ table of design tokens. Ideal for places where you want to show a list of the tokens you should use — brand palettes, spacing ramps, typographic scales, or top level components like ‘buttons’.

Drop a Design tokens block, pick the set, and choose which modes to display. You can even granularly select which tokens to include. Values update automatically on the next sync.

Inline “@-mentions”

Writing long-form docs? Type @color.button.primary.background.default (or any token name) and zeroheight embeds a live chip that always shows the latest value. Great for call-outs like “For any active buttons, we stick to @color.button.primary.background.default, which will almost always be the primary brand color”.

It's worth noting that at the moment, inline mentions work in most places. There are a couple where it doesn't, like in Rules blocks, and in the text of some other blocks like Design blocks and Image Blocks. However, if you're referencing in the body of the page, in tables, or in callout blocks, you're all good!

Theming the zeroheight UI with tokens

If you’re on the Starter or above plan, you’ll be able to customize your styleguide, and if you’ve got Enterprise, you’ll be able to create themes for your styleguide. At the moment, there isn’t a live sync with tokens and theming. However, you can reference tokens directly in the zeroheight customization panel, instead of having to copy and paste all the hex values. One thing to note is that these aren’t linked, so if you update your tokens, your customization won’t update.

📚 Key takeaways

  • Use the Design Tokens block for evergreen reference tables; use @ mentions for context.
  • Train editors to watch for “token not found” warnings after renames.
  • For theme-level branding, keep a tiny token set native to zeroheight until live references land.

Automating a tokens pipeline with zeroheight and your code repo

Design tokens are pretty useless if you don’t have some way to connect them up to your code. After you get your variables into zeroheight, you can set up automation, so that whenever anything is synced from Figma to zeroheight, a pull request is made with the changes in the format you need. You can either set this up in a generic way, or export to style dictionary or the DTCG (Design Tokens Community Group)-approved JSON, to transform yourself on the code side.

What you’ll need to do to set up the token automation

On your token set page, there’s a guided way to set up automation for your tokens, which you can find by clicking ‘set up automation’. The main things to note are that you’ll have to have a repo attached to zeroheight. At the moment, we support GitHub, GitLab, Bitbucket and Azure DevOps.

The other thing to note is that the automated pull requests that are created will be ‘authored’ by whoever set the integration up. Now, what to export?

Setting up automation using zeroheight’s inbuilt transforms

The first option is to export directly out from zeroheight. You can do this in the following formats:

    • Android
    • Compose (Android)
    • Flutter
    • iOS
    • iOS Swift
    • CSS
    • JS
    • LESS

When you’re ready to set up your integration, you can specify a repo and a folder, and then whenever anyone makes an update and syncs it to zeroheight, those files will be automatically generated, and a pull request will be created in a new branch with those files. The files themselves will be a single file for every collection, with variables in the format you requested. You can then reference those variables in all your other code files.

Setting up automation using Style Dictionary or DTCG JSON

While setting up vanilla automation will work for a lot of people, some folks need more control. Some good examples of these might be to create composite tokens that combine other tokens (eg. setting up a css transform that includes multiple individual tokens), to convert into a format that is more useful on your platform (eg. transforming your text pt sizes to rem on the web), transforming to different color spaces that Figma don’t support, or including information that you can’t store in Figma (eg. providing font fallbacks on a font-family).

For this, you’ll need to have a transform layer between your design tokens and the final code. You can do this by using the DTCG JSON format, and writing your own script, or by using something like Style Dictionary to transform your tokens. If you’re interested in knowing how to transform in Style Dictionary, there’ll be another article soon on doing that.

Once you’ve written a script, you can write a quick github action file that triggers your build script whenever those particular files are updated. Again, if you want to know how to set these up, I’ll cover it off in the next article.

Wrapping up

With architecture (Part 1), naming (Part 2) and now getting those variables in to zeroheight and setting up automation nailed, your tokens can finally do what they’re meant to – flow seamlessly from Figma to production code. Up next, we’ll look at transforming your tokens using Style Dictionary and DTCG formats, as well as setting up Github Actions to make sure everything is fully automated.

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