Bird
Raised Fist0
Figmabi_tool~20 mins

Constraints for responsive behavior 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
🎖️
Responsive Design Mastery
Get all challenges correct to earn this badge!
Test your skills under time pressure!
🧠 Conceptual
intermediate
1:30remaining
Understanding Constraints in Responsive Design

In Figma, constraints help control how objects behave when the frame is resized. Which constraint setting will keep an object fixed to the right edge of its parent frame when the frame width changes?

ASet the object’s horizontal constraint to 'Scale'.
BSet the object’s horizontal constraint to 'Left'.
CSet the object’s horizontal constraint to 'Center'.
DSet the object’s horizontal constraint to 'Right'.
Attempts:
2 left
💡 Hint

Think about which side the object should stick to when the frame grows or shrinks.

visualization
intermediate
1:30remaining
Predicting Object Position After Resizing

You have a rectangle inside a frame. The rectangle’s constraints are set to 'Left' and 'Top'. If the frame width and height increase, where will the rectangle be positioned?

AThe rectangle stays fixed to the top-left corner.
BThe rectangle moves to the bottom-right corner.
CThe rectangle stretches to fill the frame.
DThe rectangle moves to the center of the frame.
Attempts:
2 left
💡 Hint

Constraints 'Left' and 'Top' keep the object fixed relative to those edges.

🎯 Scenario
advanced
2:00remaining
Designing a Responsive Button

You want a button inside a frame to always stay centered horizontally and maintain a fixed distance from the bottom edge when the frame resizes. Which constraints should you set?

AHorizontal: Center, Vertical: Top
BHorizontal: Left, Vertical: Bottom
CHorizontal: Center, Vertical: Bottom
DHorizontal: Scale, Vertical: Bottom
Attempts:
2 left
💡 Hint

Think about how to keep the button horizontally centered and vertically fixed to the bottom.

🔧 Formula Fix
advanced
2:00remaining
Fixing Unexpected Object Stretching

A text box inside a frame stretches horizontally when the frame width changes, but you want it to keep its original width and stay fixed to the left edge. Which constraint setting is causing the stretch?

AHorizontal constraint set to 'Scale'.
BHorizontal constraint set to 'Left'.
CHorizontal constraint set to 'Right'.
DHorizontal constraint set to 'Center'.
Attempts:
2 left
💡 Hint

Which constraint makes the object resize with the frame?

dax_lod_result
expert
2:30remaining
Calculating Responsive Layout Impact

In a BI dashboard, you have a measure that calculates the average sales per region. You want to create a measure that calculates the average sales only for regions visible in the current responsive layout (filtered by slicer). Which DAX expression correctly respects the current filter context for regions?

Assume the sales table is 'Sales' and the region column is 'Region'.

AAverageSalesVisible = AVERAGE(Sales[SalesAmount])
BAverageSalesVisible = AVERAGEX(VALUES(Sales[Region]), CALCULATE(AVERAGE(Sales[SalesAmount])))
CAverageSalesVisible = CALCULATE(AVERAGE(Sales[SalesAmount]), ALL(Sales[Region]))
DAverageSalesVisible = CALCULATE(AVERAGE(Sales[SalesAmount]), REMOVEFILTERS(Sales[Region]))
Attempts:
2 left
💡 Hint

Think about how to calculate average sales only for the regions currently filtered or visible.

Practice

(1/5)
1. What is the main purpose of using constraints in Figma when designing frames?
easy
A. To export designs as images
B. To add colors and styles to elements
C. To control how elements move and resize inside frames
D. To create new frames automatically

Solution

  1. Step 1: Understand the role of constraints

    Constraints define how elements behave when their parent frame changes size.
  2. Step 2: Identify the correct purpose

    They help elements move or resize responsively inside frames.
  3. Final Answer:

    To control how elements move and resize inside frames -> Option C
  4. Quick Check:

    Constraints control element resizing = D [OK]
Hint: Constraints control element resizing [OK]
Common Mistakes:
  • Thinking constraints add colors or styles
  • Confusing constraints with exporting features
  • Believing constraints create frames automatically
2. Which of the following is the correct way to set constraints for an element to stay fixed to the top and left edges of its frame in Figma?
easy
A. Set constraints to Top and Left
B. Set constraints to Bottom and Right
C. Set constraints to Center and Middle
D. Set constraints to Scale

Solution

  1. Step 1: Identify fixed position constraints

    To keep an element fixed to the top-left, you must constrain it to Top and Left edges.
  2. Step 2: Match constraints to behavior

    Top and Left constraints keep the element anchored to those edges when resizing.
  3. Final Answer:

    Set constraints to Top and Left -> Option A
  4. Quick Check:

    Top and Left constraints fix position = A [OK]
Hint: Top and Left constraints fix element position [OK]
Common Mistakes:
  • Choosing Bottom and Right for top-left fixed position
  • Using Center and Middle which centers element
  • Using Scale which resizes element proportionally
3. If an element inside a frame has constraints set to Left and Right, what happens when the frame width increases?
medium
A. The element stays the same size and moves right
B. The element disappears
C. The element stays fixed to the left edge only
D. The element stretches horizontally to fill the new width

Solution

  1. Step 1: Understand Left and Right constraints

    When both Left and Right constraints are set, the element resizes horizontally with the frame.
  2. Step 2: Predict behavior on frame resize

    Increasing frame width stretches the element to maintain distance from both edges.
  3. Final Answer:

    The element stretches horizontally to fill the new width -> Option D
  4. Quick Check:

    Left and Right constraints cause horizontal stretch = B [OK]
Hint: Left and Right constraints stretch element width [OK]
Common Mistakes:
  • Thinking element moves without resizing
  • Assuming element stays fixed only to left
  • Believing element disappears on resize
4. You set an element's constraints to Top and Bottom inside a frame, but when you resize the frame vertically, the element does not stretch. What is the likely mistake?
medium
A. The element's constraints are set to Left and Right instead
B. The element is set to fixed height instead of auto height
C. The frame is locked and cannot resize
D. The element is outside the frame

Solution

  1. Step 1: Check constraints vs element size

    Top and Bottom constraints should stretch element vertically, but fixed height prevents resizing.
  2. Step 2: Identify the cause

    If element height is fixed, it won't stretch despite constraints.
  3. Final Answer:

    The element is set to fixed height instead of auto height -> Option B
  4. Quick Check:

    Fixed height blocks vertical stretch = A [OK]
Hint: Ensure element height is auto for vertical stretch [OK]
Common Mistakes:
  • Confusing constraints with frame lock
  • Mistaking Left and Right constraints for vertical behavior
  • Ignoring element position inside frame
5. You want a button inside a frame to always stay centered horizontally and fixed 20px from the bottom edge, regardless of frame resizing. Which constraints should you set?
hard
A. Center horizontally and Bottom
B. Left and Bottom
C. Right and Bottom
D. Center horizontally and Top

Solution

  1. Step 1: Understand horizontal centering

    To keep the button centered horizontally, set the horizontal constraint to Center.
  2. Step 2: Fix vertical position 20px from bottom

    Set vertical constraint to Bottom to keep fixed distance from bottom edge.
  3. Final Answer:

    Center horizontally and Bottom -> Option A
  4. Quick Check:

    Center + Bottom constraints fix horizontal center and bottom distance = C [OK]
Hint: Use Center horizontally + Bottom for fixed bottom center [OK]
Common Mistakes:
  • Using Left or Right instead of Center for horizontal position
  • Setting Top instead of Bottom for vertical constraint
  • Not combining horizontal and vertical constraints properly