So much can be done with a single shape layer in Sketch. It’s true most designs need lots of shape layers, text, groups, masks, and Symbols. But, what if you intentionally restricted yourself to using only one shape layer? What could you create? What could a single layer achieve on its own?
The examples in the header image above each consist of only one layer. Using the record and sleeve (the design in the middle), we’ll explore techniques you can use to get more out of a single layer. You can follow along and create your own version, or duplicate the demo document for a closer look.
Conceptually, you can split shape layers into two main parts — the actual shape geometry itself, and the styling. The shape defines the areas you want to paint, while the styling determines the paint you’ll use in and around the shape.
Make the most out of shapes
You can use pre-made shapes, like rectangles and ellipses, or create your own using the vector tool. For our record and sleeve, we’d like a circle that overlaps a square. While we could use the vector tool, it’s far easier to just use pre-made shapes and then combine them with Boolean operations afterward.
- Start by creating an Artboard that’s 180×180. Give it a background color, if you like.
- Draw an 80×80 square for the sleeve.
- Draw a 70×70 circle for the record, and drag it so that it’s vertically centered with the right edge of the square, as shown above.
- Select both shapes by holding ⇧ and clicking on them.
- Head to the menu and choose Layer > Combine > Union.
Creating a union will group both shapes together as a combined shape, but it’s still made up of more than one layer. Leaving it this way may make it easier to edit later on. But remember, we’re trying to work with just a single shape layer.
So we’ll need to convert the combined shape into a single vector path. To do this, select the combined shape, head to the menu, and choose Layer > Combine > Flatten.
You can use the same technique to create far more elaborate shapes. You’ll find it’s often easier and more accurate to use pre-made shapes to create icons, rather than using the vector tool.
But there are some limits to shape layers. A single-shape layer can only contain one continuous path — so if you flatten two circles that don’t overlap, it won’t result in one shape layer.
Give your layer some style
You can even give the individual colors within a gradient their own opacity, which means you can stack multiple gradients on top of each other. So let’s give that a go by making a Radial Gradient for the vinyl record.
- Select the oval shape — the record.
- Set the fill type to a Radial Gradient.
- Move the middle point to the center of the record, and the color point to the outer edge of the record.
- Add multiple color points along the gradient to match the image above.
Now, let’s make the gradient for the sleeve. We’ll use a Linear Gradient that runs from left to right across the shape, and add transparent colors where we’d like the record’s gradient to show.
- Choose Layer › Style › Add Fill. Alternatively, you can go to Fills in the Inspector and click on + to add a new fill.
- Set the fill type to a Linear Gradient.
- Drag the gradient’s endpoints so that they begin on the top left of the shape and end on the top right.
- Add color points along the gradient to match the image above. The example also contains color points that are close to form the hard edges.
Want to give the sleeve a bit of lighting? You can add another Linear Gradient that runs from the top left of the shape to the bottom right. Just add a bit of white to the top left color point and fade it out until the other end of the gradient is completely transparent.
- Head to the menu, choose Layer › Style › Add Fill.
- Set the fill type to a Linear Gradient.
- Drag the gradient ends to the top left and bottom right of the record sleeve portion of the shape.
- Add a color point close to the bottom left of the sleeve to match the image above.
It’s worth being careful when stacking gradients, though. Areas that blend multiple gradients via blend modes or transparency are more prone to banding — something to look out for when stacking shadows, too. The best approach is to stack as few styles as possible to get the result you’re after.
You could even use multiple borders, which can contain gradients too. We don’t need them for our record and sleeve example, but you’ll find multiple borders in the easel example in the demo document, in case you’re interested.
Show off your skills in our one-layer challenge
We’ve covered quite a few techniques you can use to get the most out of a single layer in Sketch. We hope you’ve learned something, but we also love learning from you. What can you create using a single layer in Sketch?
We’re hosting a one-layer design challenge and we’d love to see what you can come up with! This is your chance to get creative, challenge yourself, and of course, have fun. You can share your entry on Instagram, Twitter, or LinkedIn using the hashtag #SketchDesignChallenge — or by sharing your work on our forum!
We’ll be accepting entries until March 17, so be sure to share your work by then! You can also learn more about the challenge by checking out the full terms and conditions.
We can’t wait to see what you create!
Marc Edwards is the designer and co-founder at Bjango. When he’s not designing iStat Menus and Bjango’s other apps, Marc creates generative art, speedruns icons, and writes articles for Bjango’s website. He also created and maintains a bunch of open-source, design-related projects. You can keep up with Marc’s work on YouTube and Mastodon.