Figma logoFigma Intermediate 25 min

Figma Components and Variants: Build a Reusable Button System

Components let you design once and reuse everywhere. Variants and component properties turn dozens of button states into one tidy, easy-to-use component.

Components: Variants & design systems – Figma cover image

Key takeaways

  • A main component is the source; instances are copies that update when the main component changes.
  • Create a component with Ctrl+Alt+K (Windows) or Cmd+Option+K (macOS).
  • Variants group related versions (size, state, style) into one component set with simple dropdowns.
  • Component properties for text, booleans and instance swaps cut down the number of variants you need.

A real product might have hundreds of buttons. If each one is a separate group of layers, changing the corner radius means editing hundreds of objects. Components solve this: you design the button once and reuse it everywhere, and changes flow through the whole file.

Main components and instances

  • The main component is the original. It shows a four-diamond icon in the Layers panel.
  • Instances are copies. They show a single diamond icon.
  • Edit the main component, and every instance updates.

Step 1: Create a button component

  1. Build a button with auto layout (text plus padding, see the auto layout tutorial).
  2. Select it and press Ctrl + Alt + K (Windows) or Cmd + Option + K (macOS), or click the Create component button in the toolbar.
  3. Rename it clearly, for example Button.

Pro tip: Name layers inside the component too (“Label”, “Icon”). Clear names make overrides and properties much easier later.

Step 2: Add variants

With the component selected, click Add variant in the right sidebar. Figma creates a component set with a purple dashed border.

  1. Duplicate the variant for each state you need: Default, Hover, Pressed, Disabled.
  2. Rename the property from “Property 1” to State and give each variant its value.
  3. Add another property, Size, with Small, Medium and Large.

Now designers can pick “Size: Large, State: Hover” from simple dropdowns on any instance.

Step 3: Add component properties

Component properties keep your variant count under control:

PropertyUse it forExample
TextEditable label from the sidebarButton label
BooleanShow or hide a layerShow icon: true/false
Instance swapSwap a nested componentChoose which icon
VariantSwitch between variantsSize, State

Select the label layer, and in the Text section click the property icon to create a Text property. Do the same for the icon layer’s visibility to create a Boolean property.

Step 4: Use and override instances

Drag instances from the Assets panel. Change the label, toggle the icon, pick a size. These overrides are kept even when you later restyle the main component.

Step 5: Share it as a library

To use your components in other files, publish them from the Assets panel as a library, on plans that support team libraries. Updates then appear as notifications in every file that uses them.

Watch out: Do not detach instances (Ctrl+Alt+B or Cmd+Option+B) to make quick edits. A detached instance no longer receives updates, which is how design systems slowly fall apart.

Practice

Create a button set with three sizes, four states and a boolean icon property. Then build a small login form using only instances. Change the main component’s corner radius and watch the whole form update at once.

Frequently asked questions

What is an override?

An override is a change you make on an instance, such as new text or a different colour. Overrides stay in place when the main component updates, as long as you did not change that same property.

How many variants is too many?

If a component set grows into hundreds of variants, it gets slow and hard to use. Use boolean properties for things like showing an icon, and instance swap properties for icons, instead of creating a variant for each combination.

Written by

Ain Ali

Ain Ali is an entrepreneur and professional graphic designer specialising in logo design, branding, website design, app design and UI/UX in Figma, and the founder of techngraphic.com.

More about Ain

Ask a question or leave a tip

Your email address will not be published.

Keep learning