Prototypr

Prototyping, UX Design, Front-end Development and Beyond 👾 | ✍️ Write for us…

Follow publication

Putting Figma’s Auto-Layout through its paces

Chris Bam Harrison
Prototypr
Published in
4 min readDec 9, 2019

A few months ago, the evil geniuses at Figma tweeted this teaser image:

Many of us guessed that this was probably hinting at the ability to rearrange components in a group based on their size. Well, we were right (yay), and Figma calls this feature auto-layout.

Let’s see what it can do!

First, let’s talk about fundamentals. For most people, auto layout is going to allow you to design elements that contain text without having to redesign them when the text changes. The first use most of us will have for this feature are dynamically resizing buttons, as seen in this great tweet:

As the length of the text increases, so does the other elements in the button. Neat. You can see above how much time this saves us.

The other awesome new use for this is rearranging elements in a group. To explain this in detail, let me introduce you to a screen I’ve been working on:

A screen layout with a fixed header, and fixed footer. The center of the screen contains a vertical cluster of text and image
It’s an app that helps you learn to play board games, which is an oddly specific topic, but just go with it, alright? Alright.

This is a pretty basic screen layout. Header, footer, and some content. For this example, we’ll focus on the content. I’ve got an image element, a heading, and some body copy.

The first pain point here is adding copy to the heading, or the body copy. In a pre-auto layout world, adding a second line to the heading would mean rearranging the layout to accommodate a second line.

The same header as before, but now with enough copy for two lines. The spacing in the header isn’t right.
That’s great, Figma. Exactly what I wanted.

As you can see, it’s completely ruined my spacing. I’ll need to go in and fix that manually, moving and resizing my components, since that’s the only option.

But, there’s gotta be a better way!

Let’s turn on auto layout and see how flexible we can make this relatively simple layout.

An example of the auto layout settings. It shows the arrangement is set to vertical, with 16 pixels of vertical spacing.
Auto layout arranges objects from top-to-bottom in ascending order from the layer list. This might be my only complaint about the feature.

As you can see, I’ve asked auto-layout to arrange the components vertically. Furthermore, I’ve set the spacing between objects to 16 pixels. Let’s go in and do a few things that would have broken to the layout before — resizing the image and adding an extra line to the header.

An example of auto adjusting text. A two-line header has been added, but unlike before, the spacing is correct.

You can see here that the image is smaller, and the heading is now two lines. However, auto-layout has rearranged these components automatically to retain the 16-pixel spacing.

If you think about the time you just saved, it’s obvious this feature is pretty tremendous.

You can embed auto layouts into your components, too, so you don’t have to replicate this behaviour every time you use this arrangement!

To take it to the next level, though, let’s look at putting some auto layout groups inside an auto layout:

Two images side by side. The second shows that additional information has been added to the screen, but the layout remains.

As you can see, when I add additional copy or resize the images, the layout adjusts to match.

I can’t really understate how great this is for your design process — you not basically have a flexible layout that will automatically adjust to new copy, new images, or new content blocks entirely. No work required from you, just drag your elements into the layer list or update your content, and everything is fixed.

For building screens with dynamic content, like blog posts or feeds, this is an enormous time-saver.

I know I probably sound like I’m overstating it, but this feature is a gamechanger for responsive layouts. This article barely scratches the surface of what you can do, so I encourage you to dive into Figma and try it for yourself. If you have any questions, feel free to reach out to me on Twitter, too.

Free

Distraction-free reading. No ads.

Organize your knowledge with lists and highlights.

Tell your story. Find your audience.

Membership

Read member-only stories

Support writers you read most

Earn money for your writing

Listen to audio narrations

Read offline with the Medium app

Published in Prototypr

Prototyping, UX Design, Front-end Development and Beyond 👾 | ✍️ Write for us https://bit.ly/apply-prototypr

Written by Chris Bam Harrison

UX Designer at ME Bank. I talk a lot about design, design tools, and video games. Always looking for ways to sneak soccer into conversations, too.

Responses (1)

Write a response

Sure this is really awesome feature in Figma. But doesn’t apply if you are using an instance of one component. When you are using auto layout with the component. It works. You can change the order of elements but in instance mode. Nope. So making…

--