OverlayFlow

How to Use Constraints in Figma for Responsive Design ?

Learn how to use constraints in Figma to control how objects respond when their parent frame is resized. This is essential for creating responsive and scalable designs.

Select a layer inside a frame and set constraints in the Design panel.

How to Apply Constraints in Figma

1

Select an Object Within a Frame

First, ensure your object (like a shape, text box, or group) is a direct child of a Frame. Click on the object you want to apply constraints to. Constraints only work on layers inside a frame.

2

Locate the Constraints Panel

With the object selected, look to the right-hand sidebar. In the Design tab, you will find the Constraints section, which shows a visual representation of the object within its parent frame.

3

Set Horizontal Constraints

Choose how the object should behave horizontally. The options are: Left, Right, Left & Right (stretches), Center, or Scale (resizes proportionally).

4

Set Vertical Constraints

Next, choose how the object should behave vertically. The options are: Top, Bottom, Top & Bottom (stretches), Center, or Scale.

5

Test Your Constraints

To see your constraints in action, select the parent frame and resize it by dragging its corners or edges. Observe how the child object moves or resizes according to the rules you set.

💡 Pro Tips

Pro Tips for Mastering Constraints

🖼️

Frames are Key

Remember, constraints only apply to objects that are direct children of a frame. They will not work on objects inside a group unless that group is inside a frame.

↔️

Scale vs. Left & Right

Use Scale to maintain an object's aspect ratio as the frame resizes. Use Left & Right to stretch an object horizontally, which is great for backgrounds or dividers.

⚙️

Combine with Auto Layout

For complex components, use Auto Layout to manage spacing and alignment internally, and then apply constraints to the entire Auto Layout frame to position it within a larger screen.

Fix Position When Scrolling

For elements like fixed headers or floating action buttons, check the Fix position when scrolling box in the Constraints section to keep them visible on the screen.

Need help right into Figma?

Try Overlayflow, it's an AI software assistant that can answer any questions and show you on screen where to click!

Now available for any popular app.
3-day free trial. No credit card required. Then $59 one-time payment.