Using Figma Constraints for Responsive Design

Tutorial
3 min
Published on Mar 20, 2023
Updated on
white square with Figma logo and Figma design interface with constraint feature highlighted in blue
Use AI to summarize this article
Key points

Constraints in Figma allow a child element to automatically resize in relation to its parent. Thus, when you stretch a Frame to resize it, the elements contained within that Frame will exhibit responsive behavior based on the defined constraints. This is a rather advanced tool in Figma that, once mastered, offers a significant productivity boost.

Whether for your UX and UI mockups, constraints are very effective tools for designing responsive web interfaces. These features will apply to all types of design elements such as images, components, text, buttons, groups, etc.

There are several types of Figma constraints you can use depending on the project’s needs. During the design, prototyping, and modeling phases, they will allow you to assign various responsive behaviors to one or more child elements: horizontal constraints and vertical constraints.

example of responsive design in Figma using the constraint feature

Horizontal Constraints

Horizontal constraints allow you to define how your layer will respond when you adjust your frame horizontally.

Here are the different horizontal constraints that you can apply to child elements:

  • Left: fixes the position of your layer to the left side of the Frame. When you stretch your Frame to the left, the child element will follow.
  • Right: fixes the position of your layer to the right side of the Frame. When you stretch your Frame to the right, the child element will follow.
  • Left and Right: maintains the layer's position when you modify the Frame from both the left and the right. However, this may affect the layer's size, enlarging or shrinking it.
  • Center: maintains the layer's position relative to the horizontal center of the Frame.
  • Scale: the size and position of your child element will be adjusted proportionally (as a percentage) to those of the Frame. For example, consider a Frame of 100 px containing a layer of 80 px. In this case, the child element represents 80% of the Frame. If the Frame is increased to 200px, or +20%, the layer will increase to 160 px, also +20%.

Vertical Constraints

Vertical constraints in Figma will allow you to define how a child element will react when the vertical dimensions of the Frame are altered.

There are several types of vertical constraints:

  • Top: fixes the position of the layer to the top of the Frame.
  • Bottom: fixes the position of the layer to the bottom of the Frame.
  • Top and Bottom: maintains the layer's position when you modify the Frame from both the top and the bottom. However, this may affect the layer's size, enlarging or shrinking it.
  • Center: maintains the layer's position relative to the vertical center of the Frame.
  • Scale: similar to horizontal scaling, the size and position of your layer will adjust proportionally to those of the Frame.

Uses of Constraints in Figma

Figma constraints apply to any element contained within a Frame:

  • Layers within a Frame
  • Frame within a Frame
  • For your groups

Constraints can be used to define how your elements will respond in your prototypes, for example, when you create animations.

Adding Constraints in Figma

  1. Select the child element contained within the frame. In the design sidebar (to the right of your screen), you will see a section titled “Constraints.”
  2. The blue notches represent the horizontal and vertical constraints applied to your layer. You can either adjust your vertical and horizontal constraints by clicking on the interactive dashes; or adjust them by selecting your constraints from the dropdown lists.
  3. The “Fix position when scrolling” option allows you to lock the position of your layer while scrolling. This allows you to create “Sticky Elements” on your site.
Figma interface focusing on constraints features

Ignoring Constraints in Figma

Sometimes you may need to resize your frame or layer without affecting the other elements. Instead of removing the constraints one by one, use the following keyboard shortcuts while resizing:

Mac: Hold “Cmd” + resize
Windows: Hold “Ctrl” + resize
Thomas Labonne
Thomas Labonne
Co-founder

Suggested articles

Main entrance of VivaTech 2026 in Paris featuring the official 10th-anniversary event branding, Europe’s largest technology and innovation conference.
Events

Digidop at VivaTech: Two Days at the Heart of European Tech

Digidop at VivaTech: Two Days at the Heart of European Tech
Wide view of the 2036 by Yuri & Neil stage, bringing together more than 400 marketing leaders to discuss the future of the CMO role in the age of artificial intelligence.
Events
AI

Looking Back at Our Participation in 2036, Yuri & Neil’s Marketing Event for CMOs

Looking Back at Our Participation in 2036, Yuri & Neil’s Marketing Event for CMOs
Participants networking during flowConf 2026 in Belgrade, a European conference focused on the future of web, Webflow, and AI, inside a modern industrial venue featuring “Future of Web Unpacked” banners.
Events

The 2026 edition of flowConf perfectly reflects the turning point of the European Web(flow) ecosystem.

The 2026 edition of flowConf perfectly reflects the turning point of the European Web(flow) ecosystem.

Want to turn your website into your most valuable asset?

Contact us today