Sketch is a vector drawing app for designers and this is official channel for everything Sketch; tips, tricks, examples and tutorials. Updated regularly, we hope it’ll help you become better at Sketch and learn about its hidden depths.
The fine folks over at teehan+lax for many years have had a (frankly ridiculously) comprehensive PSD freely available for download with every iOS UI element in there. This has long been an indespensable resource for iOS UI designers.
We’re therefore more than thrilled that they’ve recently released a Sketch version of this file too, and yes, it’s equally comprehensive and totally free. A big thanks to teehan+lax for making this special Sketch version.
The use case we saw ourselves presented with was is this; you’ve got two layer’s mostly overlapping each other, and you don’t want to select the one on top, no, you want the one below that. If you’ve ever done any kind of UI-design, this problem will surely ring a bell.
So here’s our solution. Normally when you click, you’ll select the first layer the mouse ‘hits’. Now though, when you hold down the option key as well, Sketch will ignore that topmost layer and select whats directly under that. Simple but effective.
As always, we’re curious to hear what you think of Sketch and the recent update, so feel free to chat with us on @bohemiancoding.
After a bit of a long pause we’re back with another tip. It’s a short one this time and something that maybe most of you know already. Yet it’s incredibly hidden; so here goes.
Notice how the color labels currently read HSB? Indeed. The default is RGB, but if you click on the RGB labels the text fields will switch to HSB mode - and vice versa. Those of you that prefer interacting with HSB values will probably appreciate this little hidden feature.
For this week we remade the new iOS7 home screen as best as we could in Sketch. Download the document here for free to use in your on mockups and examine how we built the document using advanced features such as boolean operations and blending modes.
Download here for free.
Let’s say we have a bunch of shapes selected, and we’d like to distribute these evenly horizontally. First we’d go to the mini toolbar and click the ‘Align Top’ button there (third from the left), and then to even out the space between these layers, go to Arrange > Distribute > Horizontally.
Okay, but what if I just know that I want these layers 10px apart from each other? Distribute Horizontally won’t help here as that would just space them apart in the available space. That’s where Sketch’s ‘Make Grid’ tool comes in handy. Click the first icon in the mini toolbar (the one with the four squares), and you’ll see a sheet pop down.
There you can specify the number of rows or columns to align your objects into, and you can define horizontal and vertical margins between the objects. Hit ‘Arrange’ and Sketch will do it all for you.
Now the really cool thing about this Grid sheet is that it can also create new objects for you. For example, you can add one iPhone-sized Artboard to your canvas, and then use the grid tool create a grid of them. Sketch will make the extra artboards for you and even arrange them nicely in a grid. And your artboard already had content, that would have been copied over as well.
So if you select multiple layers Sketch will reorder those for you, but if you select only one it can create copies of that grid for you. Very useful, I’d say. :-)
We do get the occasional question on how to close an existing open shape. Say for example you got something like the shape below, and now you want to complete the circle.
When you draw a shape for the first time you can close it by clicking on the first point of the shape again; we’ll close the shape for you and take you out of the vector tool as well. However, for existing shapes we don’t. Why is that?
Inside the vector tool you can move any point around by clicking on it and then dragging it. We figured it’d be pretty weird if that wouldn’t work for the first point of an open shape. If that’d instead close the shape for you you’d never be able to move the first point…
Instead, we got an option in the menu; Edit > Paths > Close, and this even works outside the vector tool. While we’re there though, there are a few other options available that might be of interest to you. Definitely worth exploring!
Social Icons by Marcelo Marfil
72 free icons to use on your website, all made in sketch and fully layered.
Sketch comes with a powerful masking tools, but as they don’t work like they do in apps like Photoshop, we thought a few tips would be appropriate here.
The most simple use of a mask is to use a shape to hide part of an image, and Sketch has a special command to do that for you: Drop an image in the canvas and place any shape over it. Select both and then go to the menu and choose “Edit > Mask with Selected Shape”.
For more manual control over masking you can turn any shape into a mask by going to “Edit > Use as Mask”. Now if you place another layer partially outside the masks bounds, you’ll see its contents are clipped to the mask. Any subsequent layer you add will be masked in the same way.
If you don’t want a certain layer to be masked anymore, you can go to the menu and choose Edit > Ignore Underlying Mask and from that layer onward, the mask is ignored. Note that any masked layer is marked with a dot before its preview in the layer list.
However this can get fiddly pretty quickly. Instead it’s better in general to use Groups to limit a masks’ influence. By placing the mask and the layer(s) you want masked in a group you’ll make sure the mask has no influence outside the group - and it has the added benefit of organising your layers neatly.
In fact, that’s exactly what we are doing for you if you choose Edit > Mask with Selected Shape”.
Sometimes using the outline of a shape as a mask isn’t enough. For example you may want to fade out an image along a gradient. To use this, set your Masks’ mode to Alpha Mask in Edit > Mask Mode. Then give your mask a gradient fill from (for example) any transparent colour to opaque black.
For an alpha mask, Sketch only looks at the opacity of the colours, not to the actual colour itself.
And that’s all there’s to say about masks really. If you got feedback, or suggestions for a topic, we’d love to hear from you on @sketchapp
It’s time for another little Sketch tip. This one may be one that’s gone unnoticed for many, but I think it’s extremely useful.
To see exactly how many pixels there are between two objects - or between an object and its artboard, select the shape, hold down the Option-key on the keyboard and hover your mouse over the second shape:
Admittedly, it doesn’t sound like the most exciting topic out there. However, a quick glance at Sketch’s inspector will reveal that we have a ton of text fields in there; positioning, size, border thickness, color values, and much more.
Surely, for something that common, we must have a few extra tricks up our sleeve? Indeed, we do.
First of all, we present you with: Math! That’s right, you can do addition, subtraction, multiplication, division and more. Trying to shift a layer 48px to the left? Easy. Want to double layer’s width? Easy again.
Secondly, you will have noticed that when you hover over a text field they show little arrow buttons on the left. (Which disappear as soon as you click inside the text field). Clicking these buttons will increase or decrease the value by 1 (or by 10 if you hold the shift-key). As long as the text field doesn’t have focus you can also click+drag up/down or left/right to scrub the value.
Once the text area does have focus, you can arrow up/down to decrease the value and, again, shift up/down will increase/decrease it tenfold.
Not bad for simple text fields, right?