Skip to content

Sketch plugin that distributes selected objects vertically or horizontally with a given spacing

License

Notifications You must be signed in to change notification settings

nullnotfound/SketchDistributor

 
 

Repository files navigation

SketchDistributor

A Sketch plugin that distributes selected objects vertically or horizontally with a specified spacing.

Like so:

Distributor in action

Installation

I recommend using Sketch Toolbox, but you can also download and unpack the zip archive and then open Distributor.sketchplugin, Sketch will then open and install the plugin for you.

How-to

You select the objects you want to distribute, then ask Distributor to do it:

  1. Distribute Horizontally … (CTRL+OPTION+H), brings up the Distributor dialog box with horizontal distribution preselected. You specify spacing (in pixels).
  2. Distribute Vertically … CTRL+OPTION+V, same as above for vertical distribution.
  3. Distribute again (CTRL+OPTION+A) applies the last used distribution settings on the selected objects.
  4. Distribute … (CTRL+OPTION+D), same dialog box as above, remembering the last distribution direction. (Mostly here for legacy reasons.)

The distribution depicted above you get by typing CTRL+OPTION+V, 10, . Your fingers can stay on the keyboard.

Note that you can use negative spacing to get overlap:

Tabs distributed -14px

(CTRL+OPTION+H, -14, )

It Works with Runner

If you are using the amazing Runner plugin you can also access the Distributor commands from there:

Runner Screenshot

Runner Badge

Bugs / Comments / Questions / Suggestions

Is the plugin misbehaving? File an issue. Have a suggestion? File an issue. You can pretty much file an issue for whatever reason. Please include the version of the plugin you are using if you think it could be relevant (it most often is). There is also:

  • A low-traffic chat room over at Join the chat at https://gitter.im/PEZ/SketchDistributor
  • Twitter: @PappaPEZ

Known Issues

The plugin can't help with distributing rotated layers correctly. See issue #10. Also some shapes have a strange bounding rectangle according to Sketch. That makes them distribute less perfectly especially in vertical direction. Hoping for the Sketch API to soon make it possible to handle both these cases.

Sketch Community Attention

This little plugin is surprisingly often present in various Top X Sketch Productivity plugins articles. Too many to list here, but here are a few that got me smiling and almost bursting:

About

Sketch plugin that distributes selected objects vertically or horizontally with a given spacing

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • JavaScript 98.8%
  • Shell 1.2%