Bird
Raised Fist0
Figmabi_tool~20 mins

Component properties (text, boolean, instance swap) in Figma - Practice Problems & Coding Challenges

Choose your learning style10 modes available

Start learning this pattern below

Jump into concepts and practice - no test required

or
Recommended
Test this pattern10 questions across easy, medium, and hard to know if this pattern is strong
Challenge - 5 Problems
🎖️
Component Properties Master
Get all challenges correct to earn this badge!
Test your skills under time pressure!
🧠 Conceptual
intermediate
2:00remaining
Understanding Boolean Component Properties

In Figma, you create a component with a boolean property named ShowIcon. When ShowIcon is true, an icon appears in the component instance; when false, it disappears.

What is the main benefit of using a boolean property for this?

AIt locks the icon so it cannot be edited in instances.
BIt automatically changes the icon color based on user interaction.
CIt allows toggling the icon visibility without creating multiple component variants.
DIt duplicates the component to create separate files for each icon state.
Attempts:
2 left
💡 Hint

Think about how boolean properties simplify design variations.

dax_lod_result
intermediate
2:00remaining
Using Text Component Properties for Dynamic Labels

You have a Figma component with a text property called ButtonLabel. You create two instances: one with ButtonLabel set to 'Submit' and another set to 'Cancel'.

What will be the text shown in each instance?

AThe text property cannot be changed in instances.
BBoth instances show the default label from the main component.
CBoth instances show 'ButtonLabel' as literal text.
DThe first instance shows 'Submit' and the second shows 'Cancel'.
Attempts:
2 left
💡 Hint

Text properties let you customize labels per instance.

visualization
advanced
2:30remaining
Instance Swap Property Usage

You have a component with an instance swap property called IconType that can swap between three icon components: SearchIcon, CloseIcon, and MenuIcon.

Which visualization best shows how the instance swap property affects the component?

AA single component with a dropdown to select and display one of the three icons inside it.
BA component that changes color but keeps the same icon regardless of selection.
CThree separate components each with a fixed icon and no swapping ability.
DA text label that changes based on icon selection but does not swap icons.
Attempts:
2 left
💡 Hint

Instance swap lets you replace parts inside a component dynamically.

🔧 Formula Fix
advanced
2:30remaining
Troubleshooting a Boolean Property Not Working

You created a boolean property ShowBadge in a component to toggle a badge's visibility. However, when you toggle it in instances, the badge never appears or disappears.

What is the most likely cause?

AThe badge layer is not linked to the boolean property visibility in the main component.
BBoolean properties only work with text layers, not shapes like badges.
CYou must create separate variants instead of using boolean properties.
DThe boolean property name must start with 'Is' to work.
Attempts:
2 left
💡 Hint

Check how the boolean property controls layers inside the main component.

🎯 Scenario
expert
3:00remaining
Designing a Flexible Button Component

You need to design a button component in Figma that supports:

  • Changing the button text
  • Showing or hiding an icon
  • Swapping the icon between different styles

Which combination of component properties should you use?

AUse a boolean property for text changes, a text property for icon visibility, and instance swap for button color.
BUse a text property for the button label, a boolean property to toggle icon visibility, and an instance swap property to select the icon style.
CUse only multiple variants for each combination of text, icon visibility, and icon style.
DUse instance swap for text, boolean for icon style, and text property for icon visibility.
Attempts:
2 left
💡 Hint

Think about which property type fits each feature best.

Practice

(1/5)
1. What is the main purpose of using component properties in Figma?
easy
A. To export components as images
B. To customize parts of a component without creating new components
C. To change the color of the entire Figma file
D. To delete unused components automatically

Solution

  1. Step 1: Understand component properties

    Component properties allow you to change parts inside a component without making a new one.
  2. Step 2: Identify the main benefit

    This saves time and keeps designs consistent by reusing the same component with variations.
  3. Final Answer:

    To customize parts of a component without creating new components -> Option B
  4. Quick Check:

    Component properties = customize parts [OK]
Hint: Think: change parts, not whole component [OK]
Common Mistakes:
  • Confusing properties with exporting features
  • Thinking properties change whole file colors
  • Assuming properties delete components
2. Which of the following is the correct way to create a boolean property in a Figma component?
easy
A. Use the boolean property type and toggle it on or off
B. Add a text field and type 'true' or 'false'
C. Swap the instance with another component
D. Change the component's fill color

Solution

  1. Step 1: Identify boolean property usage

    Boolean properties in Figma are toggles that switch between true or false states.
  2. Step 2: Recognize correct creation method

    You create a boolean property by selecting the boolean type and toggling it on or off, not by typing text or swapping instances.
  3. Final Answer:

    Use the boolean property type and toggle it on or off -> Option A
  4. Quick Check:

    Boolean property = toggle true/false [OK]
Hint: Boolean means toggle on/off, not typing text [OK]
Common Mistakes:
  • Typing 'true' or 'false' in text instead of using boolean
  • Confusing instance swap with boolean property
  • Changing colors instead of property type
3. Given a component with a text property named Label set to "Submit", what will happen if you change the Label property to "Send" in an instance?
medium
A. The text property will be removed from the instance
B. The main component's text changes to "Send" for all instances
C. The text inside the instance changes to "Send" without affecting the main component
D. The instance will break and show an error

Solution

  1. Step 1: Understand text property behavior

    Text properties allow instances to override text without changing the main component.
  2. Step 2: Apply to the example

    Changing the Label property in an instance updates only that instance's text to "Send".
  3. Final Answer:

    The text inside the instance changes to "Send" without affecting the main component -> Option C
  4. Quick Check:

    Text property override = instance text change only [OK]
Hint: Instance text changes, main stays same [OK]
Common Mistakes:
  • Thinking main component text changes
  • Expecting errors on property change
  • Assuming property gets deleted
4. You tried to swap an instance property with another component, but the swap option is grayed out. What is the most likely cause?
medium
A. The components are not from the same component set or variant group
B. You forgot to select the boolean property first
C. Text properties cannot be swapped
D. You need to restart Figma to enable swapping

Solution

  1. Step 1: Understand instance swap rules

    Instance swap works only between components in the same set or variant group.
  2. Step 2: Identify cause of grayed swap

    If swap is disabled, it usually means the components are unrelated or not grouped properly.
  3. Final Answer:

    The components are not from the same component set or variant group -> Option A
  4. Quick Check:

    Swap enabled only in same variant group [OK]
Hint: Swap only works within same variant group [OK]
Common Mistakes:
  • Trying to swap unrelated components
  • Confusing boolean property with instance swap
  • Restarting app unnecessarily
5. You have a button component with a boolean property IsDisabled that toggles the button's color and disables clicks. How would you set up the component properties to allow instance users to swap the icon inside the button easily?
hard
A. Change the main component's icon directly for all instances
B. Add a boolean property for the icon and toggle it on/off
C. Add a text property and type the icon name manually
D. Add an instance swap property linked to a set of icon components

Solution

  1. Step 1: Understand instance swap property

    Instance swap lets users replace parts like icons by choosing from predefined components.
  2. Step 2: Apply to icon swapping

    To let users swap icons easily, add an instance swap property linked to icon components.
  3. Step 3: Avoid incorrect methods

    Boolean toggles can't swap icons; text properties require manual typing; changing main affects all instances.
  4. Final Answer:

    Add an instance swap property linked to a set of icon components -> Option D
  5. Quick Check:

    Instance swap = easy icon replacement [OK]
Hint: Use instance swap for easy icon changes [OK]
Common Mistakes:
  • Using boolean for icon swap
  • Typing icon names instead of swapping
  • Changing main component icon directly