Locofy Docs
PluginLegacy (Classic)Design structureDesign optimiserStructure Your Frames Better

Structure Your Frames Better

Use our Design Optimiser to structure your frames into autolayout-ready layouts

Introduction to Structuring your Frames

This is the fourth step of the Design Optimiser to Structure your frames better into Autolayout-ready layouts.

This is important, because auto layout allows our designs to fill or shrink as needed for the content to reflow for different screen sizes.

However, if auto layout is applied to unstructured frames, the design may be affected. As such, in this step, the Design Optimizer will guide you to structure your frames to ensure that your original design is maintained while making it responsive.

Objective for Structuring of Frames

In order to prepare our frames for auto layout, we want to make sure that 3 criteria are met.

1. Single row or column

Figma autolayout only supports one direction at a time so if we have multiple rows and columns we have to split our frames into single rows or columns.

Image 11426

2. Equal spacing between items

Figma autolayout applies equal spacing between items so we need to make sure that all the spacing between items are the same

Image 11427

3. Consistent alignment

Figma’s autolayout does not allow the alignment of objects to be controlled individually so me need to make sure there is consistent alignment of all children objects within the parent frame

Image 11428

Applying the fix

The design optimiser will detect and list badly structured frames which can fall into 4 different diagnoses. To view the diagnosis for a badly structured frame, select the ‘Learn how to fix it’ button to open up the panel.

Image 11429

There are 4 possible diagnosis for badly structured frames and a different error screen for each diagnosis

Inconsistent alignment

Image 11430

The first diagnosis is inconsistent alignment. It means that the elements within the frame do not share a common top, centre or bottom alignment. The design optimiser will guide you to fix these issues by grouping up elements together to ensure that there is a common alignment

  1. In this example, there is a slight misalignment on the right panel.
Image 11431
  1. Hold on command and extend the frame on the right panel such that both elements will be top aligned 
Image 11432

Auto-Fixes for Inconsistent Alignment

The Design Optimiser will go beyond guiding you to fix inconsistent alignment, but rather even suggest options to achieve a consistent alignment. Simply choose the one that works best for you.


Inconsistent Alignment

Inconsistent Gap

Image 11433

The second diagnosis is for inconsistent gaps. It means that the spacing between elements in the frame are not constant. The design optimiser will guide you to fix these issues by grouping up elements together to ensure that there is a common spacing

  1. In this example, there are 2 gaps of different sizes between the 3 frames. To resolve this, frame up the 2 cards on the right together.
Image 11434
  1. Now, for each frame there is a consistent spacing (as each frame only has one gap)
Image 11435

Auto-Fixes for Inconsistent Gaps

The Design Optimiser will go beyond guiding you to fix inconsistent gaps, but rather even suggest potential better groupings. Simply choose the one that works best for you.


Inconsistent Gaps

Multiple Rows and Columns

Mult Row Col Diagnosis

This occurs when there are more than one row and columns of elements in a single frame

  1. In this example, we want to group up the elements such that it either has a single row or column
Image 11440
  1. Group up the top row for the header
Image 11441
  1. Group up the bottom row for the cards on the bottom
Image 11442

Now, there is a clear column direction for the outermost frame.

Auto-Fixes for Multiple Rows and Columns

The Design Optimiser will go beyond guiding you to fix multiple rows and columns, but rather even suggest potential better groupings. Simply choose the one that works best for you.


Multiple Rows Cols

3 possible issues

There can be 3 possible issues: Inconsistent Gap and Alignment, Multiple rows or columns, Floating elements.

Image 11436

The fourth diagnosis shows all three issues. You will first need to assess which of the two issues apply to the frame. It is possible that all three apply, or just two of the three issues apply.

Inconsistent gap and alignment

This occurs when there is unequal spacing and different alignments for elements in a single row or column

  1. In this example, there there are 2 gaps of different sizes between the 3 panels
Image 11437
  1. Group the 2 left panels with similar gap.
Image 11438
  1. Create a frame for the left panel, hold on command and extend the frame on the leftmost panel such that both elements will be top aligned.
Image 11439

Multiple Rows and Columns

As mentioned above, this occurs when there are more than one row and columns of elements in a single frame

Image 11440

Floating elements

This occurs when there are elements that are meant for design purposes. Usually these might be overlapping on top of content, or partially outside of the frame.

  1. In this example, we want to first apply autolayout to the frame without the floating element.
Image 11443
  1. Remove the floating element from the frame. Then ensure that the frame is well structured. Click on ‘Recheck’ to verify this.
Image 11444
  1. Apply autolayout to the frame and drag the floating element back in. Then, use the absolute positioning setting to pull the floating element back into its original position
Image 11445

The design optimizer identifies all the badly structured frames and lists them for you. However, if you determine that the frame does not need to be responsive you can go ahead and click on the ‘ignore’ button to skip this step for that frame

It might take a bit of getting used to, however, once you have completed the steps a few times, you will find this easy to fix.

Once you’ve resolved all the items in this step, you will be taken to the next step. Which helps you to apply autolayout to your well-structured frames.

If you have any feedback or suggestions, please share it with us at support@locofy.ai

On this page