Sketch Constraints
Sketch Constraints is a plugin that integrates constraints in Sketch to lay out layers. These constraints are relative to the parent, either a group or an artboard, and they are linked to layer names, so every layer with the same name will have the same constraints applied to it.
Usage
⌘ + E
Edit Constraints
⌘ + L
Update Layout
Example
Installation
Make sure you have the latest version of Sketch 3 installed. (Sketch 3.3+)
- Download the ZIP file of this repository
- Double click on
Sketch Constraints.sketchplugin
Notes
- Constraints are not relative to other layers, only to the parent.
Update Layout
updates every artboard of the current page.- When a group is resized, all the children layers are resized. If you want a child layer to keep its size, check
Width
and/orHeight
. - Currently, constraints are linked to layer names. Linking them to layer IDs wasn't a better solution because it would stop working for duplicated artboards and layers. If you know how to improve this, ping me on Twitter or create an issue.
Inspiration
- This Medium article from Josh Puckett.
- Bind from Alasdair Monk.
- Sketch Flex Layout from Matej Hrescak.
License
Sketch Constraints is released under the MIT license. See LICENSE for details.