How to create component variants in Figma

Learn how to turn a shape into a component, add a variant, name its property value, and pick between variants in the Layers panel in Figma.

Quick answer

To create component variants in Figma, draw a shape and click Create component in the right sidebar. Then click Add variant to duplicate it into a second variant. Type a new value for Property 1, such as Hover, and press Enter. Select either variant from the Layers panel to edit it separately.

Steps at a glance

  1. Draw a shape with the Rectangle tool
  2. Click Create component in the right sidebar
  3. Click Add variant
  4. Type a name for the new variant value
  5. Select a variant in the Layers panel

Interactive demo

Loading demo…

Summary

Variants let one component hold several states, such as default and hover, in a single set. You keep related designs together and switch between them from one place instead of managing separate copies.

Step-by-step guide

  1. Step 1

    Draw a shape for the button

    Choose the Rectangle tool in the bottom toolbar and drag on the canvas to draw a shape. This shape becomes your first variant, so size it the way you want the finished button to look. The right sidebar now shows the Design tab for the selected shape.

  2. Step 2

    Create a component

    With the shape selected, click Create component in the right sidebar. The layer turns into a component and the Layers panel marks it with a component icon. Components are the base Figma needs before it can offer variants.

  3. Step 3

    Add a variant

    With the component selected, click Add variant in the right sidebar. Figma adds a second copy of the shape inside the component, and the Layers panel now lists two variants. The new variant starts with the name Variant2.

  4. Step 4

    Name the new variant

    The value field next to Property 1 is highlighted for editing. Type a name that describes the new state, such as Hover, and press Enter. The Layers panel updates to show the new name.

  5. Step 5

    Select the original variant

    In the Layers panel, click Default to select the first variant. Click Hover to switch back to the second one. Each variant can now be edited on its own while both stay inside one component.

Why this matters

You are building a button that needs a normal state and a hover state. Variants keep both inside one component, so you edit them side by side and every copy of the button stays consistent as the design changes.

Frequently asked questions

  • Can I add more than two variants?

    Click Add variant again with the component selected. Each click adds another variant that you can rename the same way.

  • Do I need a paid plan to create variants?

    This guide was captured on a free plan and the steps worked there.

Create interactive demos like this one — free, no coding required.

Start for free →