Skip to main content

primaryAxisAlignItems

Applicable only on auto-layout frames, ignored otherwise. Determines how the auto-layout frame’s children should be aligned in the primary axis direction.

Signature

primaryAxisAlignItems: 'MIN' | 'MAX' | 'CENTER' | 'SPACE_BETWEEN'

Remarks

Changing this property will cause all the children to update their x and y values.

  • In horizontal auto-layout frames, “MIN” and “MAX” correspond to left and right respectively.
  • In vertical auto-layout frames, “MIN” and “MAX” correspond to top and bottom respectively.
  • “SPACE_BETWEEN” will cause the children to space themselves evenly along the primary axis, only putting the extra space between the children.

The corresponding property for the counter axis direction is counterAxisAlignItems.

On this page