Constraints

Constraints control how a shape repositions and resizes when its parent frame is resized. They apply to shapes inside frames that do not have auto-layout enabled.

If a frame has auto-layout enabled, child sizing is controlled by the layout properties (fixed, hug, fill) instead of constraints.

Horizontal Constraints

ConstraintBehavior
LeftShape stays a fixed distance from the parent's left edge
RightShape stays a fixed distance from the parent's right edge
Left & RightShape stretches to maintain distance from both edges
CenterShape stays centered horizontally in the parent
ScaleShape scales proportionally with the parent's width

Vertical Constraints

ConstraintBehavior
TopShape stays a fixed distance from the parent's top edge
BottomShape stays a fixed distance from the parent's bottom edge
Top & BottomShape stretches to maintain distance from both edges
CenterShape stays centered vertically in the parent
ScaleShape scales proportionally with the parent's height

Example

A "Submit" button pinned to Right and Bottom will stay in the bottom-right corner of its parent frame, regardless of how the frame is resized.

A header bar with Left & Right horizontal constraint will stretch to match the full width of its parent frame.