How to Align Layers to Key Object

Alignment plays a big part in the design process – it’s something that designers do on a daily basis. That’s why it’s important to automate it as much as possible. In the previous blog post, you’ve learned how to create custom shortcuts to align selected layers horizontally and vertically quickly, without moving a mouse. While Sketch app is equipped with basic alignment options, I’m missing a feature to align layers to a particular object. And I know I’m not the only one.

Luckily Sketch community is full of awesome people like yourself that help expand Sketch app’s features. Lucien Lee developed an AlignTo plugin that allows you to align layers to a key object. Thanks to her, this will save you a ton of time in the long run.

Download the plugin from a Github page or install it by using Sketch Toolbox. Then go to Plugins > AlignTo and select Setting. Here you can select whether you want to choose a key object manually or plugin selects it automatically by using a top or bottom layer in the selection. Personally, I find it easier to select the layer manually since it doesn’t break my organization in the layer list.

Align To Plugin Settings

Once you’ve chosen the setting that works with your workflow select the layers you’d like to align. Then go to Plugins > AlignTo and select the alignment. Keyboard shortcuts are easy to remember so if you use this plugin a lot you’ll get the hang of it pretty quickly.

Align To Plugin Modal

Align To Plugin Alignment

That’s it! In the images above you can see the final result. I’m sure this will save you tons of headaches and time in the future.

If you found this article helpful please share it to let Sketch team know that there’s a need for a feature like this. Hopefully, we’ll be able to see this functionality being implemented into later Sketch app releases.