Understanding Figma Constraints: From Zero to Hero.

Chukwuemeka Iheonye
Friends of Figma Lagos
6 min readJan 23, 2021
The Constraints feature was a nightmare and a blessing

I imported an icon, the perfect icon size, I was so happy to finally get the icon size I wanted. Initially, I had to struggle with resizing my icons without it changing their size every time I try to expand them by dragging the frame. That happened because of what I will explain in this article. It took a time of constant usage to come to a full understanding of this feature and its importance. Right now I can’t even imagine how I was surviving without the knowledge of Constraints. I believe that there are many designers right now that are probably new to the tool or have been using the tool and need a proper understanding of this feature and I hope this will help. Let’s dive right into understanding how every part works and what it’s for.

Icon set to Scale makes the icons expand when the outer frame is dragged

Different parts of the Constraint feature

The Horizontal constraints

Horizontal Constraints

The Horizontal constraints help you position your designs at a particular place along the x-axis in your frame.

NB: Constraints does not work for groups. They must be included in a frame.

Different types of Horizontal Constraints

We have different types of horizontal constraints. We are going to talk about them to understand what they really mean and stand for with examples.

  1. Left constraints: This helps keep your design elements on the left side of your frame, no matter how wide your drag your frame, it maintains the same position which is the left. But once you move the frame from the left side, the element moves with it.
Left Constraints

2. Right Constraints: This helps maintain the position of an element in a frame to the right side of the frame and only moves when you drag the right side of the frame. This is useful for setting form elements.

Right Constraints

3. Center Constraints: This is very useful when you want your element to maintain the same position no matter where the frame expansion is coming from, whether the left or the right(Horizontally), it maintains the center. This is very useful for the Icon set.

Center Horizontal constraints

4. Left and Right: This makes sure the elements in a frame, scales to the left and right when expanded at equal proportions. It’s advisable to only use this when you understand the behavior you want your design element to exhibit.

Left and right constraints

5. Scale Constraints: I think this was the most frustrating part of my encounter with constraints. But I later found out it was the most useful. This helps you maintain the same scale with your frame. If you increase the frame x2 the elements therein increase by 2 in the horizontal axis. This is perfect for backgrounds of form fields.

Scale Horizontal Constraints

Vertical Constraints

The Vertical constraints help you position your designs at a particular place along the y-axis in your frame. This is very effective when working with large frames.

Different types of Vertical Constraints

We have different types of Vertical constraints, we are going to go through them.

  1. Top Constraints: This is very important and is mostly the default for elements in a frame. It makes sure your elements stay at the top always when you drag your frame down. This is usually good for Top Nav Bar🤗.
Top Constraints

2. Bottom Constraints: This is what you need to make sure your elements stay at the bottom of your frame, when you drag your frame and you need the elements to maintain the bottom space, this is the best. The best case is the footer and bottom Nav.

Bottom Constraints

3. Top and Bottom Constraints: This is for setting the movement to the top and bottom of the frame when you drag the frame vertically. This works like the scale property vertically.

Top and Bottom Constraints

4. Center Constraints: This makes sure the elements stay in the center of the frame and maintains their position vertically. This is a good feature.

Center Vertical Constraints

5. Scale Constraints: Just like the Horizontal scale, the vertical scale makes elements increase in size vertically.

Scale Vertical Constraints

Using Fix Position when scrolling

In addition to the numerous abilities of constraints comes the ability to fix an element in a particular place while scrolling in the prototype. Yes, when you play a prototype and wonder how the designer made the top nav to maintain a particular position while others scroll, this is the secret🤐 🤫.

Once this is checked the layers panel is divided into 2, The Fixed and the Scroll. Anything in the Fixed layer will maintain its position while scrolling. and anything in the scroll layer moves😁.

Fixed Positioning

I hope this short article helps you to conquer your fear of Constraints and make your design easier and better. If you ❤️ what you read you can drop claps and leave comments if you need clarification.

Follow me on Twitter where I tweet everything design.

I also run a youtube channel dedicated to teaching the Figma tool.

Thanks for reading🤗🤗🤗.

--

--

Chukwuemeka Iheonye
Friends of Figma Lagos

Product Designer at @SBSC | Design Teacher @sophisticateddesigns | In love with wonderful experiences