Advertisment

 DECEMBER 15, 2023

/
#FIGMA
How to Use Variables in Figma – A Handbook for BeginnersIjelekhai Faith OlohijereIjelekhai Faith Olohijere

How to Use Variables in Figma – A Handbook for Beginners
Prerequisites:
Table of Contents:
What are variables?
Differences between Variables and Styles in Figma
Why are Variables Important to the Design Process?
How to Create Variables in Figma
How to Create Colour Variables in Figma
How to Create Colour Variables for Tokens
How to Implement Colour Variables in Your Designs
How to Create Different Modes with Variables
How to Create Number Variables in Figma
How to Create String Variables in Figma
How to Create Boolean Variable in Figma
How to Use Variables for Advanced Prototyping
Advanced Prototyping with Number Variables
Advanced Prototyping with Boolean Variables
How to Use Variables for Developers- Using APIs
Conclusion
What Are Variables?
Differences between Variables and Styles in Figma
Variables are a more advanced feature, and they allow you to define and reuse values like colours, text, and spacing across your designs. On the other hand, styles are predefined sets of design properties such as text styles, colour styles, and effect styles.
Variables allow designs to change when used in various contexts, because of their dynamic nature, unlike styles. For example, you can change your designs from light mode to dark mode or have padding values change when designing for different devices. This makes variables useful for creating design systems with adaptable components.
Variables offer a more flexible design process in creating flexible design components, especially where you want to change values like button text or color on different instances of the same component. Styles are typically used for maintaining consistent design elements like button styles, text headings, or colour palettes.
Variables can store raw, single values, while styles store sets of values.
Why are Variables Important to the Design Process?
How to Create Variables in Figma
Color: used for colour fills.
Number: used for dimensions, corner radius, and auto layout properties.
String: used for text layers and variant properties.
Boolean: used to toggle layer visibility.
How to Create Colour Variables in Figma
Step 1: Open a new Figma file
Variable-1
Blank Figma file
Step 2: Choose a colour palette
Variable-3
Creating a colour palette
Step 3: Create variables for each colour
variable-4
Click on local variables
variable-5
Create a colour variable
Variable-6
Choose colour variables
variable-7
Rename variable & type in colour code
Variable-141
Edit variable
variable-8
Edit the colour variable/add a description
variable-10
Create variables for other colours
variable-11
Group the colour variables
New group with selection
Edit variables
Duplicate variables
Delete variables
variable-12
New group with selection
variable-14-1
Rename group
variable-15
Colour blue variables grouped.
variable-16
Rename collection
variable-39
Renamed primitives collection
How to Create Colour Variables for Tokens
variable-21
New collection
variable-24
Creating and grouping text variables
variable-26
Assigning colour from libraries
variable-27
Choosing colour black
variable-28
Assigning colour variables for text
variable-29
Colour variables for surfaces and borders
How to Implement Colour Variables in Your Designs
variable-30
Low-fidelity wireframes
variable-32-1
Click on button
variable-33-1
Select a fill colour from the colour variables in libraries
variable-34-1
Implemented button colour
variable-35-3
Implementing colour variable for button text
variable-36-1
Implemented button text colour
variable-37-1
Updating colour variables for other screens
variable-38-1
Adding illustrations to updated design
How to Create Different Modes with Variables
Primary Button
Main Blue
Main Black
Main Background
Variable-142
Opening "Local variables"
Variable-143
Creating a new collection
Variable-144
Renaming a collection
Variable-145
Renamed collection "Modes"
Variable-146
Creating a variable called Color
Variable-147
Created color variable with default colour code: FFFFFF
Variable-148
Renamed color variable: Background
Variable-149
Clicking on the plus icon
Column 1 (the title of the variable – Background)
Mode 1 (the first value of the variable – colour code FFFFFF)
Mode 2 (the first value of the variable – colour code FFFFFF)
Variable-150
Created new mode
Variable-151
Renamed modes: Light & Dark
Variable-152
Changed value for dark mode background
Continue Reading


Post a Comment

0 Comments

Close Menu