0
0
Figmabi_tool~10 mins

Slots pattern for flexible components in Figma - Interactive Code Practice

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

Complete the code to define a slot in a Figma component.

Figma
<Component>
  <[1] name="header" />
</Component>
Drag options to blanks, or click blank then click option'
ASlot
BFrame
CGroup
DText
Attempts:
3 left
💡 Hint
Common Mistakes
Using Frame instead of Slot for flexible placeholders.
Confusing Group with Slot.
2fill in blank
medium

Complete the code to insert content into a named slot in a Figma component instance.

Figma
<ComponentInstance>
  <[1] slot="header">
    <Text>Welcome</Text>
  </[1]>
</ComponentInstance>
Drag options to blanks, or click blank then click option'
AFragment
BFrame
CGroup
DSlot
Attempts:
3 left
💡 Hint
Common Mistakes
Using Frame or Group instead of Slot to fill slot content.
Omitting the slot attribute.
3fill in blank
hard

Fix the error in the slot usage by completing the code correctly.

Figma
<Component>
  <Slot name=[1] />
</Component>
Drag options to blanks, or click blank then click option'
A{header}
Bheader
C"header"
D'header'
Attempts:
3 left
💡 Hint
Common Mistakes
Using unquoted slot names causing syntax errors.
Using single quotes instead of double quotes in JSX.
4fill in blank
hard

Fill both blanks to create a component with two named slots.

Figma
<Component>
  <[1] name=[2] />
  <Slot name="footer" />
</Component>
Drag options to blanks, or click blank then click option'
ASlot
B"header"
DFrame
Attempts:
3 left
💡 Hint
Common Mistakes
Using Frame instead of Slot for slot definition.
Not quoting the slot name.
5fill in blank
hard

Fill all three blanks to insert content into multiple slots in a component instance.

Figma
<ComponentInstance>
  <[1] slot=[2]>
    <Text>Title</Text>
  </[1]>
  <[3] slot="footer">
    <Text>Contact info</Text>
  </[3]>
</ComponentInstance>
Drag options to blanks, or click blank then click option'
ASlot
B"header"
D"footer"
Attempts:
3 left
💡 Hint
Common Mistakes
Using Frame or Group instead of Slot to fill slots.
Not quoting slot attribute values.