Design workflow quick tip #6 — Creating dynamic equal spaces among layers in Sketch

anjhero
YoungInnovations' Blog
3 min readNov 27, 2017

--

It’s been a while since I’ve written a design quick tip (the last one was almost 2 years ago — Feb, 2016). With this post, I’m hoping to continue this series again. 🤞🏽

Here’s a scenario. Imagine we’re designing horizontal navigation for a site. We type in navigation items and distribute them horizontally. Boom! Our navigation is ready. Now, lets say we need to edit one of the navigation’s layers in the middle. Most of the time, this would lead to changing a layer’s width which in turn would probably break the equal spaces among our navigation items. We will then, again, have to select all of the navigation items and click the distribute horizontally button. So much work! 🙃

There’s an easy way though.

The solution

Lets create a basic horizontal navigation with the following items:

  • Home
  • About
  • Work
  • Contact

We type in each navigation item in a different layer, select all of these navigation items and distribute them horizontally with equal space.

Time-lapse of a simple menu design

Now, on to our issue.

Lets replace Work with Portfolio:

This messes up our beautiful space between Portfolio (previously, Work) and Contact.

Meet Anima’s Auto-layout plugin

Among other many cool features of this plugin, we’ll talk about Stacked Group feature that solves our issue described above.

First of all, install Anima’s Auto-layout plugin from here. You may install using Runner plugin as well.

Now, follow these steps:

  1. Select all of the navigation items
  2. In the anima plugin window, click on Create a Stacked Group (shown below) button.

3. Make sure you’re on Horizontal tab (since we are spacing horizontally) on the window that appears. Enter a desired spacing value and press enter.

Ta-da! Now we have a bullet-proof equal-spaced navigation items. Try editing any layer in the stacked group, Auto-Layout plugin will maintain the spacing that you’ve entered before.

Here’s a time lapse video of the entire process:

Time lapse of maintaining equal space among layers with Auto Layout

You may use this method for other things as well: maintaining a grid, space between an image and text, etc.

That’s it for today’s quick-tip. See you again soon in my next post :)

Happy designing people!

--

--