New in Sketch — Independent borders, selection colors, and more Learn more

Skip Navigation

Boolean operations

3 min read

Boolean operations are how you build complex shapes from simple ones. Overlap two or more shapes, then combine, subtract, or intersect them — the originals stay intact, so you can keep adjusting until it’s right.

Using Boolean operations

Select overlapping shapes on the Canvas, then select one of the Boolean operations in the toolbar.

Use the Union operation to create a new shape that’s the sum of two or more shapes’ areas

  • Union combine.union: creates a shape that’s the sum of multiple shapes’ areas.
  • Subtract combine.subtract: removes the area of a shape from the one underneath it.
  • Intersect combine.intersect: creates a new shape from the areas where the selected shapes overlap.
  • Difference combine.difference: creates a shape from the areas where the original shapes don’t overlap (the opposite of Intersect).
  • Add combine: combines paths together without performing a boolean operation. It’s useful for open paths, or when you want to combine closed paths with better performance than Union. You’ll find it in the Toolbar, Layer menu, and Command Bar alongside the other operations. You can also apply it via A.

In versions prior to Dublin, Add was called ‘None’.

Boolean operations apply from the top layer down. For example, if you draw a smaller circle inside a larger circle and apply Subtract combine.subtract, you get a donut shape.

How to create a donut shape using the Subtract operation

Combining shapes

When you apply a Boolean operation to two or more shapes, the original shapes are grouped together in a new combined shape.

You can also create a combined shape directly in the Layer List by dragging one shape over another — the Union operation applies automatically.

Combine shapes by dragging a shape layer over another in the Layer List

Combined shapes are non-destructive, so you can edit the original shapes and change the result at any time. You can also bring two or more combined shapes together with a new Boolean operation.

Boolean operations are non-destructive, so you can keep tweaking shapes to see what works best

You can use Frames and Symbol instances as part of a combined shape or mask. They behave like regular shapes within the group, so you can combine them with other layers using Boolean operations or use them as mask sources.

Editing combined shapes

You can expand a combined shape in the Layer List just like a normal group. The group contains all the shapes that make up your combined shape, along with the Boolean operation applied to each.

To change the operation on a specific shape, click the Boolean operation icon next to it in the Layer List and pick a different one — including Add.

You can quickly apply a different Boolean operation from the Layer List

To hide one of the original shapes in a combined shape, Control-click it in the Layer List and select Hide Layer, or press H. Keep in mind that hiding a shape changes how the combined shape looks on the Canvas.

Styling combined shapes

Fills and borders

Select the parent layer and update its fill or border in the Inspector to change the combined shape’s color. The visual result is controlled by the parent — fills and borders on individual sub-layers don’t appear independently, though a sub-layer’s border thickness does affect the overall shape geometry.

If the shapes you combine only have borders and no fill, the border color becomes the fill for the new combined shape.

Corners

You can apply rounded corners to a combined shape, just like you would with a rectangle or other basic shape. Select your combined shape and set a radius value in the Corners section of the Inspector.

Rounded corners apply to the outer edges of the combined shape — the result of the Boolean operations — so you don’t need to edit the paths manually. To adjust corners on individual shapes within a combined shape, expand it in the Layer List, double-click the shape to enter editing mode, then adjust its corners independently. Learn more about corners.

Adjust corners on the combined shape, or expand it in the Layer List to edit individual shapes

If your Mac has a Touch Bar, you’ll find the four Boolean operations there when you select two or more shapes.