How to Use the Constraints Panel in Affinity Designer

Posted on 19th June 2023

The Constraints panel in Affinity Designer is a powerful tool that allows you to quickly and easily create responsive designs. In this article, we’ll take a look at how to use the Constraints panel to create a simple responsive layout.

1. Create a New Document

To get started, create a new document in Affinity Designer. For this example, we’ll create a new web document with a width of 1280px and a height of 720px.

2. Add Your Content

Next, add your content to the document. For this example, we’ll add a header, some text, and an image.

3. Add Constraints

With your content in place, it’s time to add constraints. To do this, select the object you want to constrain and then click the “Add Constraint” button in the Constraints panel. In this example, we’ll constrain the header, text, and image.

4. Set the Constraints

Once you’ve added constraints to your objects, you’ll need to set the constraints. To do this, simply click on the object and then drag the constraint handles to the desired position. In this example, we’ll set the header to be constrained to the top of the document, the text to be constrained to the left and right sides of the document, and the image to be constrained to the bottom of the document.

5. Test the Constraints

Once you’ve set the constraints, it’s time to test them. To do this, simply resize the document. As you resize the document, you’ll see the objects move and resize according to the constraints you’ve set.

6. Save the Document

Once you’re happy with the constraints, simply save the document and you’re done!

Affinity Designer’s Constraints panel is a powerful tool that can be used to create responsive designs. By constraining the position and size of objects, you can ensure that your designs will look great on any screen size.

In this tutorial, we’ll take a look at how to use the Constraints panel to create a responsive header. We’ll start by creating a simple layout with a logo and a navigation menu. Then we’ll use the Constraints panel to constrain the position and size of the objects so that they will resize and reposition themselves automatically when the screen size is changed.

Creating the layout

We’ll start by creating a new document in Affinity Designer. For this tutorial, we’ll be using a web canvas with a width of 1200 pixels.

Next, we’ll add a logo to the top-left corner of the canvas. For this tutorial, we’ll be using a simple text logo.

Then we’ll add a navigation menu to the top-right corner of the canvas. For this tutorial, we’ll be using a simple unordered list with three items.

Constraining the position of objects

Now that we have our layout created, we’ll need to constrain the position of the objects so that they will resize and reposition themselves automatically when the screen size is changed.

To do this, we’ll first select the logo and then open the Constraints panel. In the Constraints panel, we’ll click the button to create a new constraint.

In the Constraint Settings dialog, we’ll set the Type to “Position” and the Axis to “Horizontal”. Then we’ll set the Offset to “0”. This will ensure that the logo is always positioned at the left edge of the screen.

Next, we’ll select the navigation menu and then open the Constraints panel. In the Constraints panel, we’ll click the button to create a new constraint.

In the Constraint Settings dialog, we’ll set the Type to “Position” and the Axis to “Horizontal”. Then we’ll set the Offset to “100%”. This will ensure that the navigation menu is always positioned at the right edge of the screen.

Constraining the size of objects

Now that we have the position of our objects constrained, we’ll need to constrain the size of the objects so that they will resize automatically when the screen size is changed.

To do this, we’ll first select the logo and then open the Constraints panel. In the Constraints panel, we’ll click the button to create a new constraint.

In the Constraint Settings dialog, we’ll set the Type to “Size” and the Axis to “Horizontal”. Then we’ll set the Offset to “50%”. This will ensure that the logo is always half the width of the screen.

Next, we’ll select the navigation menu and then open the Constraints panel. In the Constraints panel, we’ll click the button to create a new constraint.

In the Constraint Settings dialog, we’ll set the Type to “Size” and the Axis to “Horizontal”. Then we’ll set the Offset to “50%”. This will ensure that the navigation menu is always half the width of the screen.

Testing the responsive design

Now that we have our responsive header created, we’ll need to test it to make sure it looks good on different screen sizes.

To do this, we’ll open the “Preview” panel and then select the “Device” tab. In the “Device” tab, we’ll select the “iPhone 6/7/8” device.

Then we’ll resize the “Preview” panel so that it’s the same width as the “iPhone 6/7/8” device.

Next, we’ll open the “Layers” panel and then select the “Lock” icon next to the “Constraints” layer. This will prevent us from accidentally modifying the constraints while we’re testing the design.

Finally, we’ll resize the “Document” panel so that it’s the same width as the “Preview” panel. This will allow us to see how the design looks on different screen sizes.

As we resize the “Document” panel, we can see that the logo and navigation menu resize and reposition themselves automatically. This ensures that our design looks great on any screen size.

In the constraints panel, you can quickly and easily add, edit, and delete constraints. To add a constraint, simply click the “+” button. To edit a constraint, double-click it. To delete a constraint, click the “-” button.

You can also use the constraints panel to quickly and easily change the order of constraints. To do this, simply click and drag the constraint to the desired position.

Finally, you can use the constraints panel to quickly and easily enable or disable constraints. To do this, simply click the checkbox next to the constraint.