Bird
Raised Fist0
Figmabi_tool~10 mins

Nested components in Figma - Interactive Code Practice

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

Complete the code to create a nested component in Figma.

Figma
const Button = createComponent({ type: 'button', children: [1] });
Drag options to blanks, or click blank then click option'
AFrame
BIcon
CRectangle
DText
Attempts:
3 left
💡 Hint
Common Mistakes
Choosing a container like Frame instead of a content element.
Using a shape like Rectangle which is not typical inside buttons.
2fill in blank
medium

Complete the code to reference a nested component inside a main component.

Figma
const Card = createComponent({ children: [[1]] });
Drag options to blanks, or click blank then click option'
AHeader
BFooter
CIcon
DButton
Attempts:
3 left
💡 Hint
Common Mistakes
Using Footer which is usually at the bottom, not the main nested part.
Choosing Icon which is a smaller element, not the main nested component.
3fill in blank
hard

Fix the error in the nested component declaration.

Figma
const Modal = createComponent({ children: [1] });
Drag options to blanks, or click blank then click option'
A[Header, Content, Footer]
B{Header, Content, Footer}
CHeader, Content, Footer
D(Header, Content, Footer)
Attempts:
3 left
💡 Hint
Common Mistakes
Using curly braces which define an object, not an array.
Listing components without brackets which causes syntax errors.
4fill in blank
hard

Fill both blanks to correctly nest components with props.

Figma
const ListItem = createComponent({ type: 'list-item', children: [[1]], props: { text: [2] } });
Drag options to blanks, or click blank then click option'
AText
B'Item 1'
C'Button'
DIcon
Attempts:
3 left
💡 Hint
Common Mistakes
Using 'Button' as a string instead of 'Item 1' for the text prop.
Nesting Icon instead of Text inside the list item.
5fill in blank
hard

Fill all three blanks to create a nested component with multiple children and props.

Figma
const Toolbar = createComponent({ children: [[1], [2]], props: { size: [3] } });
Drag options to blanks, or click blank then click option'
AButton
BIcon
C'large'
D'small'
Attempts:
3 left
💡 Hint
Common Mistakes
Using 'small' instead of 'large' for the size prop.
Nesting only one child instead of two.

Practice

(1/5)
1. What is a nested component in Figma?
easy
A. A component that is not reusable
B. A component placed inside another component
C. A component that cannot be edited
D. A component used only once in a design

Solution

  1. Step 1: Understand component basics

    A component is a reusable design element in Figma.
  2. Step 2: Define nested component

    A nested component is one placed inside another to build complex designs.
  3. Final Answer:

    A component placed inside another component -> Option B
  4. Quick Check:

    Nested component = component inside component [OK]
Hint: Think of components like boxes inside bigger boxes [OK]
Common Mistakes:
  • Confusing nested components with non-editable elements
  • Thinking nested means used only once
  • Believing nested components are not reusable
2. Which of the following is the correct way to create a nested component in Figma?
easy
A. Drag one component inside another component frame
B. Copy and paste a component outside any frame
C. Use the text tool inside a component
D. Create a new component without any layers

Solution

  1. Step 1: Identify how nesting works

    Nested components require placing one component inside another's frame or group.
  2. Step 2: Check options

    Dragging a component inside another component's frame nests it correctly.
  3. Final Answer:

    Drag one component inside another component frame -> Option A
  4. Quick Check:

    Drag inside frame = nest component [OK]
Hint: Drag components inside others to nest them [OK]
Common Mistakes:
  • Pasting components outside frames does not nest
  • Using text tool does not create nested components
  • Creating empty components is unrelated
3. Given a main component with a nested button component inside, what happens if you update the nested button's style?
medium
A. No changes happen to any components
B. Only the main component updates, nested buttons stay the same
C. All instances of the nested button update automatically
D. Only the current instance of the nested button updates

Solution

  1. Step 1: Understand component instances

    Nested components are reusable; updating the master updates all instances.
  2. Step 2: Apply update logic

    Changing the nested button's style updates all places it is used, including inside main components.
  3. Final Answer:

    All instances of the nested button update automatically -> Option C
  4. Quick Check:

    Update nested master = update all instances [OK]
Hint: Change master component to update all nested instances [OK]
Common Mistakes:
  • Thinking only main component updates
  • Believing changes affect only one instance
  • Assuming no automatic updates happen
4. You tried nesting a component inside another, but the nested component does not appear in the main component. What is the likely issue?
medium
A. The nested component was placed outside the main component frame
B. The nested component is locked and cannot be seen
C. The main component is not selected
D. You need to restart Figma to see changes

Solution

  1. Step 1: Check nesting placement

    For a component to be nested, it must be inside the main component's frame or group.
  2. Step 2: Identify common mistake

    Placing the nested component outside the frame means it won't appear inside the main component.
  3. Final Answer:

    The nested component was placed outside the main component frame -> Option A
  4. Quick Check:

    Nested component must be inside frame [OK]
Hint: Ensure nested component is inside main component frame [OK]
Common Mistakes:
  • Assuming locking hides nested components
  • Thinking selection affects visibility
  • Believing restart is needed for nesting
5. You have a dashboard component with nested chart and button components. You want to update the button style only in this dashboard without affecting other dashboards. How can you do this?
hard
A. Lock the nested button component to prevent changes
B. Edit the master button component directly
C. Create a new button component and replace the nested one
D. Detach the nested button component instance and edit it locally

Solution

  1. Step 1: Understand instance behavior

    Editing the master updates all instances, so direct edits affect all dashboards.
  2. Step 2: Use detaching to customize locally

    Detaching the nested button instance breaks the link, allowing local edits without affecting others.
  3. Step 3: Avoid unnecessary replacements

    Creating a new component is extra work; detaching is simpler for one-off changes.
  4. Final Answer:

    Detach the nested button component instance and edit it locally -> Option D
  5. Quick Check:

    Detach instance = local edit only [OK]
Hint: Detach nested instance to edit without global changes [OK]
Common Mistakes:
  • Editing master affects all instances
  • Replacing components wastes time
  • Locking does not allow editing
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