Using Instances of Components (Creating, Swapping, Overriding, Resetting and Detaching)

There are two aspects to a Component:

  1. The Master Component, which defines the properties of the Component.
  2. The Instance, which is a copy of the Component that you can reuse in your designs.

In this article, we'll cover:

  1. Creating Instances of a Component
  2. Swapping Instances
  3. Overriding Instances
  4. Resetting Instances
  5. Detaching Instances

Creating Instances of a Component

You can create an Instance of the Master Component to reuse across your designs. You can create an Instance of a:

  1. Component in the Current File.
  2. Component from another File.

Component in the Current File

If you're working in the same File as the Master Component, you can create an Instance by copying or duplicating that Component.

There are a couple of ways to do this. 

Duplicate the Master Component

  • Select the Master Component.
  • Duplicate it by using the Keyboard Shortcut:
    • MacOS: Command-D
    • Windows: Ctrl + D

Drag to Copy

You can use a modifier key while dragging a Component to create an Instance.

  1. Select the Master Component.
  2. Hold down the modifier key:
    1. MacOS: Option 
    2. Windows: Alt
  3. Drag the Component to create a copy. 
  4. Make sure to release the mouse before releasing the modifier key, otherwise you will just move the Component.

Copy and Paste the Master Component

  1. Select the Master Component.
  2. Copy the Component using the keyboard shortcut:
    1. MacOS: Command-C
    2. Windows: Ctrl + C
  3. Paste an Instance of the Component using the keyboard shortcut:
    1. MacOS: Command-V
    2. Windows: Ctrl + V

Components from Another File

You can also create Instances from Components that live in other Files.

The Assets Panel in the Left sidebar allows you to access all of your Components.

You can drag any Component from the Assets panel into the canvas to create an Instance.

To open the Assets Panel:

  1. Click on the Assets heading in the Layers Panel.
  2. Use the Keyboard Shortcut:
    • macOS: Option-2
    • Windows: [Alt] + [2]

You can then use the Assets Panel to:

  1. Search for a specific Component by name from among Components in the current File, and any Libraries you have access to.
  2. Switch between a Grid and List view of Components (Grid view will adapt the thumbnail size to the size and dimensions of your component)
  3. Open the Team Library modal
  4. View Local Components that were created in the current File
  5. View Components that are Private to this File
  6. View Components that are Used in the File
  7. Explore Enabled Libraries

You can select any Component from the Assets panel and drag it into the canvas to create an Instance:


Swapping Instances

When you want to use another Instance from your Component library, you can replace, or swap, any Instance for another.

In this section, we'll cover swapping:

  1. Related Components from the Context Menu
  2. Components from the Instance Menu
  3. Instances from the Assets Panel

You can see which Instance you are using in the  Instance section of the Properties Panel: 

You can quickly switch between Related Components from the context menu:

  1. Right-click on the Instance in the canvas to open the context menu.
  2. Hover over the Swap Instance setting.
  3. Select the Instance from the list of Related Components: 

Note: Related Components will be determined by:

  • How the Component is named e.g. UI/Button/Active, UI/Button/Hover and UI/Button/Inactive will be displayed together.
  • How the Component is grouped e.g. All Components that are located within the same Frame will be treated as Related Components.

Want to make changes to your layer names in bulk? Learn more about renaming layers in our Rename Layers in bulk article.

Components from the Instance Menu

The Instance dropdown allows you to replace the current Instance with an Instance from any of your Component libraries.

You can use the Instance menu to swap between:

  • Related Components. Components that grouped with the current Component by either Name or Frame.
  • Master Components that are local to This File.
  • Master Components from any Enabled Team Libraries.

Note: Figma only preserves Text overrides when swapping Components. If you swap a Component with other overrides applied, we won't apply these to the swapped Component.

To swap an Instance using the Instance menu:

  1. Select the Instance you want to replace.
  2. In the Properties Panel, click on the drop down field in the Instance section:

  3. You can then choose to:
    1. Select a Component from the Related Components section.
    2. Use the explorer to select a Component from This File.
    3. Find a Component from any of your Enabled Libraries.
  4. Components are arranged in the Instance menu based on the File, Page and Frame they live in. You can use the menu to navigate through Components nested within Files, Pages and Frames:

    Tip! The Enabled Libraries section will only show up if you have Libraries enabled within the current File. Learn more about Enabling Libraries for individual Files in our Using Team Library article.

  5. Select the Component replace the current selection with an Instance of that Component:

Instances from the Assets Panel

You can also drag Components from the Assets Panel into an existing design.

If you hold down the modifier key, you can replace an existing Instance with the one from the Assets Panel.

  1. Locate the Component in the Assets Panel.
  2. Hold down the modifier key:
    1. If the Component is not nested within another Frame or Component
      • MacOS: Option 
      • Windows: Alt
    2. If the Component is nested within another Frame or Component
      • MacOS: Option + Command
      • Windows: Alt + Control
  3. Drag the Component above the Instance you want to swap in the canvas.
  4. Make sure to release the mouse before releasing the modifier key, otherwise you will add a new Component to the canvas.


Overriding Components

When we change a single Instance, we call this an  Override. Overrides are particularly useful when you want to create a variation on a Component.

Note: We recommend renaming any Components with Overrides applied. This should be something different than the original Component or Instance name. This ensures the override remains, when switching between Iinstances.

In our example below we've changed our "Trip Card" for each holiday that we have planned.

We changed the content of our Title, Date and Status Text Objects. As well as customising the background image and participants for each trip:

Supported Overrides

You can change any of the following properties, to Override an Instance:

  • Text: Font, Weight, Size, Line Height, Letter Spacing, Paragraph Spacing, Indentation.
  • Color: Fill, Stroke, Background Color, Opacity.
  • Effects: Drop Shadow, Inner Shadow, Blur.

Tip! If you have applied an override on a specific Instance, copying that Instance will also copy the overrides.

Push Overrides to Master Component

If you've made an override you want to keep, you can push your Overrides to the Master Component. This will apply any Overrides you've applied to the Master Component.

  • This option is only available when the Master Component is in the same File, not from a published Team Library. 
  • It's not possible to push Overrides for Components nested within other Components.

To push your overrides to the Master Component: 

  1. Select the Instance with your Overrides applied to it.
  2. In the Properties Panel, click on the Instance name to open the Instance Swapping menu.
  3. Select Push Overrides to Master from the options: 
  4. Your Master Component will be updated to reflect your changes:


Resetting Instances

You can reset an overridden Instance to return it to the Component's original style. You can reset the entire Instance, or choose to reset a specific property.

You can reset an instance from a couple of different places:

  • From the Instance section in the Properties Panel.
  • From the Menu Bar.
  • From the Context Menu.

Note: You can only reset specific properties in the Properties Panel.

Reset all Overrides

  1. Select the Instance in the canvas. You want to make sure you've selected the entire Instance, not a layer within the Instance.
  2. You can reset the Instance from a number of places:
    1. From the Options menu in the toolbar. Select the Reset instance icon:

    2. Right-click on the Instance to open the Context menu. Select Reset Instance:

  3. The Instance will be reset to match the properties of the Master Component.

Tip! You can immediately undo any changes if required. Use the Keyboard Shortcuts:

  • MacOS: Command-Z
  • Windows: Ctrl + Z

Reset a Specific Override

You can also reset a specific property of the override.

  1. Select the specific layer you wish to reset.

    Tip! You can hold down the modifier key while clicking to select a nested layer:

    MacOS: Option
    Windows: Alt

  2. Go to the Instance section in the Properties Panel and click the Reset Instance icon:  
  3. You can then select which Properties you wish to reset. Select Reset Overrides to reset all properties for that layer.

Detaching an Instance

It’s also possible to detach an Instance from its Master Component. This is great if you want to make changes to the Instance, and/or create a new Component.

Once detached, Figma will nest any of the Instance's layers within a Frame. Any changes made to the Master Component will not apply to the detached Instance.

There are a number of ways to detach an Instance from the Component.

  1. Select the Instance you wish to detach.
  2. You can then detach the Instance in a number of ways:
    • From the Instance menu in the Properties panel, select Detach Instance:

    • Right-click on the Instance on the canvas or in the Layers Panel to open the Context Menu. Select Detach instance:

    • Or, use the Keyboard shortcut:
      • MacOS: Option-Command-B
      • Windows: Ctrl + B

Tip! If you have accidentally created a Component and want to turn this back into an Instance, you can:

  1. Create an Instance of that Component.
  2. Detach the instance from the Component.
  3. Delete the Original Component.

This allows you to keep the object(s) you created, without having to maintain a Master Component.

Did this answer your question? Thanks for the feedback There was a problem submitting your feedback. Please try again later.