FoxstudioLayout & styling
Constraints
3 min read
Automatic constraints
- To the top of the parent element (container, stack, etc.).
- And to the left or right edge of the parent element - whichever is the closest.
- Click on the element you want to set the auto constraints to open its Inspector panel.
- Under the General tab, click Auto constraints elements.

Manual constraints
- Select the relevant element.
- In the Inspector panel > General tab, locate the Constraints section.
- Select the 2 constraint points (top or bottom, left or right).
- Enter the value for constraints. This can be considered as the margin between the selected element and the edge of its parent.

- Horizontal constraints (left or right): Percentage (%).
- Vertical constraints (top or bottom): Pixels (px).
- On a container width of 1265px, the margin between the element and the container's left edge is 126.5px, and the margin-top of the element with the container is 100px.
- On a container width is resized to 900px, the margin between the element and the container's left edge is 10% of 900 = 90px, and the margin-top of the element with the container is 100px.
- You can apply constraints to frames you have nested within other frames.
- You can't apply constraints to elements included in a stack with the stack border.
Use alignment tools
Last updated