Using Variables in Figma to Populate Tables with Ease

pritish.sai
3 min readSep 19, 2023

Since the introduction of Figma’s variables feature a few months ago, designers have been exploring innovative ways to integrate them into their prototypes and components. Variables have primarily served as a powerful tool for creating and organizing design tokens, but designers have also harnessed their versatility for various other purposes.

In this article, I will elucidate how you can effortlessly populate tables with data by leveraging the potential of variables.

Setting Up Local Variables for Table Data

The first step involves configuring local variables to represent the cell data for your tables. When establishing a new variable, you have the choice between ‘String’ or ‘Number’. It’s important to note that, as of the current beta version of Figma’s variables feature, other cell formats such as links, images, multiline text, or dropdowns (and similar components) are not supported.

Furthermore, in Figma’s primary paid plan, users are limited to creating only four modes. This means that with the basic paid plan, you can create a maximum of four rows. However, upgrading to the enterprise version allows for the creation of unlimited modes, subsequently enabling you to have more rows.

Create your table

To incorporate components for the cell data in your table, navigate to the text layer and link the layer with the relevant variable type established in the previous step.

When generating a row of variants from the initial component, you can manually adjust the variable for the text layer in each variant.

Optionally, you can group the rows together using autolayout, which can be quite helpful. Once the layer is created, connect it to a mode that was established in the variables panel (located in the right-hand layer panel).

For instance, you might connect ‘Row 1’ to the layer, indicating to Figma that all variants within the layer with associated variables should be populated with the variable values specified under a specific mode.

Summary

This methodology is an effective means of populating diverse tables. It allows you to create distinct collections of variables with varying data. The advantage of using variables is that you can link different variables to different variants within the same component. This is considerably simpler than manually inputting text or using component properties to individually populate cell data in tables.

--

--

pritish.sai

I'm a lead product designer who specializes in enterprise design, accessibility, design systems and using AI for design.