Home » Blog » How to create component’s variants in Figma

How to create component’s variants in Figma

In this quick post, we’ll see how to create a component’s variants out of a series of buttons in Figma.

figma-course-banner-1

Watch Video Tutorial

Create Variants

In this example, I’ll use a series of buttons that I’ve previously created.

Untitled
  • In order to transform this series of button, we’ll just select all our buttons.
  • Head to the top-bar menu and hit the arrow besides the Create component icon.
  • In the drop-down menu, select Create components set
Untitled

Add variants properties

To begin, we’ll add three variants properties to our button component: icons-button, dropdown-button, and close-button.

  • First, select the Component set.
Untitled
  • Head to the Variants section in the right-hand sidebar.
Untitled
  • Hit the three dots icon in the right corner of the Variants section, and select Add new property.
Untitled

We’ll create three properties and rename them with the following names: icons-button, dropdown-button, and close-button.

To rename a property, just click on the property name and type your property name.

Here’s our Variants Properties :

Untitled

Next, we’ll add our variants values. In our example, I would like to add Boolean values: True/False.

Add variants Values

  • Let’s select our Component set and go back to the Variants section.
  • Double-click on the first property value which is Default and rename it to False.
Untitled
  • You can repeat this process for all the other Properties values.
Untitled

Apply Variants Properties

Next, we’ll apply the properties we’ve created to our Variants.

  • We’ll select the first variant.
Untitled
  • Let’s go back to the Variants section.
  • For our first variant, well keep it’s properties to default
Untitled
  • We’ll move to our second component and change the first property icon-button to true.
Untitled
Untitled

We’ve changed our value icon-button to true because our variant has an icon.

  • Let’s select the third variant and change the second property dropdown-button to true.
Untitled
Untitled

Again, the reason we’ve changed the value dropdown-button to true is because our selected variant is a drop-down button**.**

  • Let’s select the last variant and change the third property close-button to true.
Untitled
Untitled

Now, head to Assets tap in the the left-hand sidebar to access our variant.

Untitled
  • Let’s drag and drop our component set from the Assets panel to our canvas.
  • Go to the instance section in the right-hand sidebar.
Untitled

To access a specific Variant, we can switch the properties nobs.

Variant one:

Untitled

Variant two:

Untitled

Variant three:

Untitled

Variant four:

Untitled

That’s everything about component’s variants in Figma. In the next posts we’ll cover more concerning Figma components.

figma-course-banner-1

Before you go

Feel free to visit our website captain-design.com where we are sharing generously, ready for commercial use Figma and HTML templates.

You’ll find three things to help you kickstart your next project’s design :