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.
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.
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.
Choose how the object should behave horizontally. The options are: Left, Right, Left & Right (stretches), Center, or Scale (resizes proportionally).
Next, choose how the object should behave vertically. The options are: Top, Bottom, Top & Bottom (stretches), Center, or Scale.
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 for Mastering Constraints
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.
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.
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.
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.
Explore other Figma guides and shortcuts