0
0
Figmabi_tool~10 mins

Alignment within Auto Layout 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 set the horizontal alignment of items in an Auto Layout frame.

Figma
frame.layoutAlign = '[1]'
Drag options to blanks, or click blank then click option'
ATOP
BCENTER
CRIGHT
DLEFT
Attempts:
3 left
💡 Hint
Common Mistakes
Using 'TOP' which aligns vertically, not horizontally.
Using 'CENTER' when left alignment is needed.
2fill in blank
medium

Complete the code to set vertical alignment of items in an Auto Layout frame.

Figma
frame.layoutAlignVertical = '[1]'
Drag options to blanks, or click blank then click option'
AMIDDLE
BCENTER
CTOP
DBOTTOM
Attempts:
3 left
💡 Hint
Common Mistakes
Using 'MIDDLE' which is not a valid value.
Using 'TOP' or 'BOTTOM' when vertical centering is needed.
3fill in blank
hard

Fix the error in setting the alignment property for Auto Layout items.

Figma
frame.primaryAxisAlignItems = '[1]'
Drag options to blanks, or click blank then click option'
Astart
Bcenter
CSPACE_BETWEEN
DEND
Attempts:
3 left
💡 Hint
Common Mistakes
Using lowercase values like 'start' or 'center' which are invalid.
Using 'END' which aligns items to the end but does not space them.
4fill in blank
hard

Fill both blanks to set horizontal and vertical alignment inside an Auto Layout frame.

Figma
frame.layoutAlign = '[1]'
frame.layoutAlignVertical = '[2]'
Drag options to blanks, or click blank then click option'
ACENTER
BLEFT
CTOP
DBOTTOM
Attempts:
3 left
💡 Hint
Common Mistakes
Mixing up horizontal and vertical alignment values.
Using 'BOTTOM' instead of 'TOP' for vertical alignment.
5fill in blank
hard

Fill all three blanks to set primary axis alignment, counter axis alignment, and spacing mode in Auto Layout.

Figma
frame.primaryAxisAlignItems = '[1]'
frame.counterAxisAlignItems = '[2]'
frame.primaryAxisSizingMode = '[3]'
Drag options to blanks, or click blank then click option'
AMIN
BCENTER
CMAX
DSPACE_BETWEEN
Attempts:
3 left
💡 Hint
Common Mistakes
Using 'MAX' for sizing mode which makes frame fill available space.
Using 'CENTER' for primary axis alignment which centers but does not space evenly.