How to Create Variables in Figma: Simple Steps
In Figma, you create a
variable by opening the Variables panel from the right sidebar, then clicking + New variable. You can define variables for colors, text, or effects and reuse them across your design for consistency and easy updates.Syntax
Variables in Figma are created through the Variables panel and have three main types: Color, Text, and Effect. Each variable has a name and a value that you define.
Variable Name: A unique identifier for your variable.Variable Type: Choose from Color, Text, or Effect.Variable Value: The actual color code, text string, or effect settings.
Once created, you can apply variables to layers or components by selecting the property and choosing the variable from the dropdown.
figma
Variables Panel > + New variable > Choose type (Color/Text/Effect) > Name your variable > Set valueExample
This example shows how to create a color variable named Primary Blue and apply it to a rectangle's fill color.
text
1. Open your Figma file. 2. Click on the right sidebar's Variables icon. 3. Click the <New variable> button. 4. Select <Color> as the type. 5. Name it "Primary Blue". 6. Set the color value to #1E90FF. 7. Select a rectangle on the canvas. 8. In the Fill property, click the color swatch. 9. Choose the "Primary Blue" variable from the Variables dropdown.
Output
The rectangle's fill color changes to the blue defined by the "Primary Blue" variable.
Common Pitfalls
Some common mistakes when creating variables in Figma include:
- Not naming variables clearly, which makes them hard to find later.
- Creating duplicate variables with similar values instead of reusing existing ones.
- Forgetting to apply variables to components, leading to inconsistent design updates.
- Trying to use variables in unsupported properties (variables only work for color, text, and effect properties).
Always double-check that you apply the variable correctly and update the variable value to see changes everywhere it is used.
text
Wrong: - Creating multiple color variables named "Blue1", "Blue2" with same color. Right: - Create one variable "Primary Blue" and reuse it everywhere.
Quick Reference
| Step | Action |
|---|---|
| Open Variables panel | Click the Variables icon in the right sidebar |
| Create variable | Click + New variable and select type |
| Name variable | Give a clear, descriptive name |
| Set value | Define color, text, or effect value |
| Apply variable | Select layer property and choose variable |
Key Takeaways
Create variables in Figma using the Variables panel for colors, text, and effects.
Name variables clearly to keep your design organized and easy to update.
Apply variables to layers to maintain consistency across your design.
Avoid duplicate variables by reusing existing ones whenever possible.
Variables help you update multiple elements quickly by changing one value.