0
0
Figmabi_tool~20 mins

Variant properties (boolean, enum) in Figma - Practice Problems & Coding Challenges

Choose your learning style9 modes available
Challenge - 5 Problems
🎖️
Variant Mastery Badge
Get all challenges correct to earn this badge!
Test your skills under time pressure!
🧠 Conceptual
intermediate
1:30remaining
Understanding Boolean Variant Properties

In Figma, you create a button component with a boolean variant property named Disabled. What happens when you set Disabled to true?

AThe button disappears from the design completely.
BThe button changes to a disabled style, such as greyed out and non-clickable.
CThe button becomes larger and changes color randomly.
DNothing changes visually or functionally.
Attempts:
2 left
💡 Hint

Think about how boolean variants usually toggle a state on or off.

🧠 Conceptual
intermediate
1:30remaining
Using Enum Variant Properties

You have a component with an enum variant property called Size with options Small, Medium, and Large. What is the main advantage of using an enum variant over multiple boolean variants for size?

AEnum variants allow only one size to be selected at a time, preventing conflicting states.
BEnum variants let you select multiple sizes simultaneously.
CEnum variants automatically animate between sizes.
DEnum variants disable the component when selected.
Attempts:
2 left
💡 Hint

Consider how enum variants differ from boolean variants in exclusivity.

dax_lod_result
advanced
2:30remaining
Calculating Active Variant Count with DAX

You have a table of components with boolean variant properties IsPrimary and IsDisabled. Write a DAX measure to count how many components have IsPrimary set to true and IsDisabled set to false.

Figma
ActivePrimaryCount = CALCULATE(COUNTROWS(Components), Components[IsPrimary] = TRUE(), Components[IsDisabled] = FALSE())
AActivePrimaryCount = SUMX(Components, IF(Components[IsPrimary] && NOT Components[IsDisabled], 1, 0))
BActivePrimaryCount = COUNTROWS(FILTER(Components, Components[IsPrimary] = TRUE() && Components[IsDisabled] = FALSE()))
CActivePrimaryCount = CALCULATE(COUNTROWS(Components), Components[IsPrimary] = TRUE(), Components[IsDisabled] = FALSE())
DActivePrimaryCount = COUNTROWS(Components) - COUNTROWS(FILTER(Components, Components[IsPrimary] = FALSE() || Components[IsDisabled] = TRUE()))
Attempts:
2 left
💡 Hint

Use CALCULATE with filter conditions to count rows matching both criteria.

visualization
advanced
1:30remaining
Best Visualization for Enum Variant Distribution

You want to show how many components use each Size enum variant (Small, Medium, Large) in a dashboard. Which visualization type is best to clearly show the count per size?

AA pie chart with slices for each size count.
BA line chart showing sizes over time.
CA scatter plot with size on x-axis and count on y-axis.
DA bar chart with sizes on the x-axis and count on the y-axis.
Attempts:
2 left
💡 Hint

Think about which chart type clearly compares categories side by side.

🔧 Formula Fix
expert
2:00remaining
Debugging Variant Property Conflict in Data Model

You have a data model with a table Components that includes a boolean variant property IsActive and an enum variant property Status with values Active, Inactive. You notice that some components have IsActive = FALSE but Status = 'Active'. What is the most likely cause?

AThe boolean and enum variant properties are not synchronized, causing conflicting states.
BThe data model automatically converts boolean to enum, so this is expected.
CThe <code>Status</code> enum property is case sensitive and 'Active' is misspelled.
DThe <code>IsActive</code> property is ignored in filtering, so it has no effect.
Attempts:
2 left
💡 Hint

Think about how two variant properties representing similar states can cause conflicts if not managed.