Skip Navigation

Resizing constraints

When you resize an Artboard you can control how the layers on it will behave. You can choose to leave everything on the Artboard in place and at its original size or resize all the content. The layer’s behavior can be further controlled using resizing constraints applied directly to it.

If you want a layer to resize relative to the Artboard it’s a part of, select the Artboard itself and check Adjust content on resize in the Inspector.

Enabling content resizing for an Artboard in the Mac app (v91 August 2022).

The RESIZING section in the DETAILS tab of the Inspector lets you choose how to constrain any selected layer’s resizing behavior when the Artboard, group or Symbol they are a part of is resized. To set the constraints, select a layer within an Artboard, group or Symbol and apply the required RESIZING constraints:

  1. Pin to Edge - choose which edges of a parent your layer will be pinned to on resize, click the edges you want to enable
  2. Fix Size - set whether your Layer’s height and width should stretch or stay at a fixed size

A Preview shows how the controls you select affect your layer’s behavior.

The RESIZING constraints in the Mac app (v91 August 2022).

Tip: By default, we’ll resize layers within a group or Symbol relative to their parent, including any padding.

Fix size

The Fix Size constraints keep a layer’s height or width (or overall dimensions) the same, no matter how its parent is resized.

Example of using the Fix Size resizing constraint (in this example width is used) in the Mac app (v91 August 2022).

This is useful, for example, if you have a menu bar in an interface that you want to keep the same height, no matter how tall the Artboard it’s in becomes.

In this example, the menu symbol height is fixed and its width is not. It will resize horizontally for larger device sizes, but not stretch vertically.

Pin to Edge

Pin to Edge fixes the distance between a layer and a particular set of edges or corners of its parent, no matter how the parent is resized.

Example of using the Pin to Edge resizing constraint (in this example top and left are used) in the Mac app (v91 August 2022).

This is useful, for example, if you have a floating action button within an interface, pinning this to the top and left edges will make sure it stays the same distance from the corner of an Artboard.

In this example, the button has a fixed height and width and is pinned to the top-left edge. It wont resize and its position will stay fixed when its parent container resizes.

Last updated on 17 Aug 2022

Was this article useful?

Thanks for your feedback.
An error occurred, please try again later.

Create your Workspace for free!

Whether you’re new to Sketch or back to see what’s new, we’ll have you set up and ready to do your best work in minutes.