Setting up Variants (Steps)

1. Learning how to create variants

Step 1: Create an element named Button and add in it a text “Button”. Also add a background color of dark color.

Button

Step 2: Turn the button into a component by right clicking the button and selecting the option of turn into component or use the shortcut: Ctrl + Alt + K. Add buttons to it by clicking on the plus icon to add a variant. Or you can also choose the new variant option at the top row.

Add variant

Step 3: The set of components and variants must look like these in the side view tab. Also change the background colors of the buttons that have been added.

Variants

Step 4: Now go to the Assets tab and you can find all your components. Add an instance of the component in the design file.

Instance of Button

Step 5: Now add properties of the variants in the column on the right side. Under the heading of current variant you can add properties for it. Change the name of property to state and set the values: Pressed, Hover, Disabled to each of the button variants.

Adding Properties to variant

Step 6: The property & it’s value tab should look like this for the Button component.

Variant Properties

Step 7: Now when we click on the instance of the Button we created using the Assets tab, we can see in the right column different sets of properties and it’s values that we can set. If we click on hover, it changes to the background color & features of hover, and if disabled then it shows the features of the disabled button variant. This is how variant ensures the reusability of the designs in a much better & efficient way.

Hover state of Instance

Pressed State of Instance

2. Setting up variants for Icons

Step 1: If we select all the three buttons and click on CTRL + D, we can create a set of replications for the button. On rearranging them and selecting them all together, we can view collective properties of the button component in the right side.

Component Set

Step 2: Select two icons of correct & wrong. Copy and paste the correct icon for the button variants in the right side and the wrong icons in the left side button variants. The design should look like this:

Icon Designed Buttons

Step 3: Create another property for the variant of name “Icon” and value “True”. We are doing this so that if the icon of right is there then the value of Icon will be true, else it will be false.

Note: For all the buttons with right icon, select all together and then set the Icon property to true. And for all buttons with cross icon, select all of them together and then set the Icon property to false.

Variant Property

Step 4: Insert another instance of the button in the design file.

Creating Instance

Step 5: Now you can see two properties for the button. One is for the state, whether it is hover, or disabled or pressed which you can change by selecting one of the options. Second is the Icon option with a toggle checkbox. If true then the right icon will be shown and if false then the wrong icon will be shown.

Instance when Icon is toggled true

Instance when Icon is toggled false

What are Variants in Figma and How do you set them up?

Similar Reads

What are Variants?

Variants in Figma are components with similar properties and are grouped together according to their similarities in features & characteristics. Variants are simple reusable components that help save time and efficiency and remove the trouble of creating an element over and over again. In this article, we will learn what variants are in Figma and how can we set them up and use them in our design....

Setting up Variants (Steps)

1. Learning how to create variants...

Properties

Variants are reusable components and they are grouped on the basis of their similar properties. Variants and their attributes can be defined by simply specifying the name of the frame, or component in the following Syntax:...

Importance of Variants

Variants are easy to maintain and allow reusability of elements. This in turn saves time, efforts & improves efficiency. Grouping of components based on similar properties is only called creating variants and that helps in an effective use of elements. For eg. A button in both light and dark mode can be separated in terms of properties of variants. By creating variants, individual access and amendments become easy and each element can be accessed to be changed accordingly. For eg. If a variant is created of several lists of navigation bar, both in row and columns, then each column’s variants can be individually changed....

Limitations of Variants

Variants in Figma have a limitation in case of design systems that are huge. When the designing project is huge and we are suppose creating buttons and their variants, it becomes very difficult to toggle for every button to change their icon or set their property such that their icons can be changed. In that case we would prefer to use component properties....

Conclusion

Variants help in reducing the efforts & dependency on creating an element over and over again alongwith adding new prototypes every time after UI creation. Variants in Figma help mitigate this issue and creating variants of every reusable element help preserve the user experience features and different functionalities added to the component. Covering the steps and screenshots above, one can easily set up variants in Figma and take use of their advantages....