Bird
Raised Fist0
Figmabi_tool~10 mins

Creating components in Figma - Interactive Practice

Choose your learning style10 modes available
Practice - 5 Tasks
Answer the questions below
1fill in blank
easy

Complete the code to create a component from a selected frame in Figma.

Figma
const component = figma.createComponent();
component.name = [1];
Drag options to blanks, or click blank then click option'
Afigma.currentPage.name
BselectedFrame.id
Ccomponent.id
DselectedFrame.name
Attempts:
3 left
💡 Hint
Common Mistakes
Using the component's own id instead of the frame's name.
Using the page name instead of the frame's name.
2fill in blank
medium

Complete the code to detach an instance from its main component.

Figma
const detachedNode = instance.[1]();
Drag options to blanks, or click blank then click option'
Adetach
BremoveInstance
CdetachInstance
DbreakInstance
Attempts:
3 left
💡 Hint
Common Mistakes
Using 'detach' which is not a valid method.
Using 'removeInstance' which does not exist.
3fill in blank
hard

Fix the error in the code to create a component set from selected variants.

Figma
const componentSet = figma.[1](variants);
Drag options to blanks, or click blank then click option'
AcreateComponentSet
BcreateSetComponent
CmakeComponentSet
DcreateVariantSet
Attempts:
3 left
💡 Hint
Common Mistakes
Swapping words in the method name.
Using 'createVariantSet' which is not a valid method.
4fill in blank
hard

Fill both blanks to correctly set the main component and add it to the page.

Figma
const mainComponent = figma.[1]();
figma.currentPage.[2](mainComponent);
Drag options to blanks, or click blank then click option'
AcreateComponent
BappendChild
CaddChild
DcreateInstance
Attempts:
3 left
💡 Hint
Common Mistakes
Using 'addChild' which is not a Figma method.
Using 'createInstance' instead of 'createComponent'.
5fill in blank
hard

Fill all three blanks to create a component, set its name, and move it to the current page.

Figma
const comp = figma.[1]();
comp.[2] = 'Button';
figma.currentPage.[3](comp);
Drag options to blanks, or click blank then click option'
AcreateComponent
Bname
CappendChild
DcreateInstance
Attempts:
3 left
💡 Hint
Common Mistakes
Using 'createInstance' instead of 'createComponent'.
Trying to set 'title' instead of 'name'.
Using 'addChild' instead of 'appendChild'.

Practice

(1/5)
1. What is the main benefit of using components in Figma?
easy
A. It removes all unused colors from your design.
B. You can reuse design parts easily across your project.
C. It converts your design into code instantly.
D. It automatically creates animations for your design.

Solution

  1. Step 1: Understand the purpose of components

    Components are reusable design elements that help maintain consistency.
  2. Step 2: Identify the main benefit

    Reusing parts saves time and keeps designs uniform.
  3. Final Answer:

    You can reuse design parts easily across your project. -> Option B
  4. Quick Check:

    Components = Reuse design parts easily [OK]
Hint: Components help reuse design parts fast [OK]
Common Mistakes:
  • Thinking components create animations automatically
  • Believing components convert designs to code
  • Assuming components clean unused colors
2. Which of the following is the correct way to create a component in Figma?
easy
A. Drag layers into the assets panel without selection.
B. Select layers and press Ctrl + G to group them.
C. Right-click and choose 'Export' to create a component.
D. Select layers and press Ctrl + Alt + K to create a component.

Solution

  1. Step 1: Recall the shortcut for creating components

    In Figma, Ctrl + Alt + K (Cmd + Option + K on Mac) creates a component from selected layers.
  2. Step 2: Eliminate incorrect options

    Grouping (Ctrl + G) groups layers but does not create components; exporting saves files; dragging without selection won't create components.
  3. Final Answer:

    Select layers and press Ctrl + Alt + K to create a component. -> Option D
  4. Quick Check:

    Create component shortcut = Ctrl + Alt + K [OK]
Hint: Use Ctrl+Alt+K to create components quickly [OK]
Common Mistakes:
  • Confusing grouping with component creation
  • Trying to export instead of creating components
  • Dragging layers without selecting them
3. If you edit the main component's color from blue to red, what happens to its instances?
medium
A. All instances update to red automatically.
B. Only new instances will be red; old ones stay blue.
C. Instances keep blue unless manually changed.
D. Instances get deleted and replaced with red shapes.

Solution

  1. Step 1: Understand component-instance relationship

    Instances inherit properties from the main component unless overridden.
  2. Step 2: Apply the color change effect

    Changing the main component's color updates all instances automatically to keep consistency.
  3. Final Answer:

    All instances update to red automatically. -> Option A
  4. Quick Check:

    Main component edit updates all instances [OK]
Hint: Edit main component to update all instances [OK]
Common Mistakes:
  • Thinking old instances stay unchanged
  • Believing instances must be manually updated
  • Assuming instances get deleted on edit
4. You created a component but instances do not update after editing the main component. What is the likely issue?
medium
A. You forgot to save the file after editing.
B. You created a group instead of a component.
C. You edited an instance instead of the main component.
D. You used the wrong shortcut to create the component.

Solution

  1. Step 1: Identify difference between main component and instance

    Only editing the main component updates all instances; editing an instance changes only that one.
  2. Step 2: Diagnose why instances don't update

    If instances don't update, likely the main component was not edited but an instance was.
  3. Final Answer:

    You edited an instance instead of the main component. -> Option C
  4. Quick Check:

    Edit main component, not instance, to update all [OK]
Hint: Always edit main component, not instances [OK]
Common Mistakes:
  • Editing instances expecting all to update
  • Assuming saving file triggers updates
  • Confusing groups with components
5. You want to create a button component with two states: normal and hover. How should you organize components in Figma for easy reuse and switching?
hard
A. Create a main button component and use variants for normal and hover states.
B. Create two separate components named 'Button Normal' and 'Button Hover' without linking.
C. Group two buttons in a frame and use that as a component.
D. Create instances of the button and manually change colors for hover.

Solution

  1. Step 1: Understand component variants in Figma

    Variants allow multiple states inside one component for easy switching.
  2. Step 2: Apply variants to button states

    Create a main button component with variants for normal and hover to reuse and switch states efficiently.
  3. Final Answer:

    Create a main button component and use variants for normal and hover states. -> Option A
  4. Quick Check:

    Use variants for multiple component states [OK]
Hint: Use variants to manage component states easily [OK]
Common Mistakes:
  • Creating separate unlinked components for states
  • Grouping buttons instead of using variants
  • Manually changing instances for hover state
Recommended

Ready to prove it?

Pass the test and this pattern moves unknown strong while earning +1 Grip toward your certificate.

10 questions~5 mineasy hard