# Masks and boolean shapes

> Clip layers to a shape with a mask, and combine shapes into new outlines with Union, Subtract, Intersect and Exclude.

Source: https://uxdeck.app/guide/masks-booleans (checked against uxdeck on 16 October 2026)

A **mask** shows its layers only inside the outline of a shape: a photo cropped to a circle, a pattern inside a letter, a screenshot inside a phone's rounded screen. A **boolean** shape combines two or more shapes into a new outline: a ring from two circles, a speech bubble from a rounded rectangle and a triangle. Both are live: the shapes inside stay editable, so you can adjust them at any time.

When you want the result as one plain vector instead, **Flatten** bakes it in.

## Mask layers

1. Put the shape that should do the clipping **below** the layers you want to clip, in the same parent.
2. Select the shape and the layers above it.
3. Press <kbd>⌃</kbd><kbd>⌘</kbd><kbd>M</kbd> (<kbd>Ctrl</kbd><kbd>Alt</kbd><kbd>M</kbd> on Windows), or right-click and choose **Use as mask**.

The lowest selected layer becomes the mask. It and the layers above it go into a new frame called **Mask group**, sized to the mask, and everything is clipped to the mask's outline. The mask shape itself is not painted: only its outline counts. Everything keeps its place on the page.

What can be a mask:

- **A rectangle**: its corner radius is kept, so a rounded rectangle gives rounded corners.
- **Any other shape**: an ellipse, polygon, star, vector or boolean group, by its outline.
- **A picture**: its transparency is the mask, so a PNG with a soft edge gives a soft edge.

To move what is inside, select it in the layers list (or <kbd>⌘</kbd>-click it on the canvas) and drag. To move everything, move the **Mask group**.

### Release a mask

Select the **Mask group** or the mask layer and press <kbd>⌃</kbd><kbd>⌘</kbd><kbd>M</kbd> again, or right-click and choose **Release mask**. The group goes, the layers stay where they are, and the mask shape is painted again.

## Boolean shapes

1. Select two or more shapes that share a parent: rectangles, ellipses, lines, polygons, stars, vectors or other boolean groups.
2. Pick an operation from the row at the top of the Design tab, the right-click menu, or a shortcut:

| Operation | What it keeps | Keys |
|---|---|---|
| **Union** | everything any shape covers | <kbd>⌥</kbd><kbd>⇧</kbd><kbd>U</kbd> |
| **Subtract** | the bottom shape, minus the ones above it | <kbd>⌥</kbd><kbd>⇧</kbd><kbd>S</kbd> |
| **Intersect** | only where all the shapes overlap | <kbd>⌥</kbd><kbd>⇧</kbd><kbd>I</kbd> |
| **Exclude** | everything except where they overlap | <kbd>⌥</kbd><kbd>⇧</kbd><kbd>E</kbd> |

The shapes move into a boolean group named after the operation, which takes the look (fill, stroke) of the bottom shape. Each shape inside is still its own layer: move, resize or edit points on it and the outline updates.

To change the operation later, select the group and pick another one in the same row. To undo the combination entirely, select the group and press <kbd>⇧</kbd><kbd>⌘</kbd><kbd>G</kbd> (**Ungroup**): the shapes come back as they were.

## Flatten

Select shapes, vectors or a boolean group and press <kbd>⌘</kbd><kbd>E</kbd>, or right-click and choose **Flatten**. They become one vector layer, drawn exactly where they were, with the style of the bottom layer. Flatten is final: the separate shapes are gone, though <kbd>⌘</kbd><kbd>Z</kbd> brings them back.

Flatten a boolean group when you are happy with the outline and want to edit its points directly, or before you export an icon.

## Shortcuts

| Action | Keys |
|---|---|
| Use as mask / Release mask | <kbd>⌃</kbd><kbd>⌘</kbd><kbd>M</kbd> |
| Union | <kbd>⌥</kbd><kbd>⇧</kbd><kbd>U</kbd> |
| Subtract | <kbd>⌥</kbd><kbd>⇧</kbd><kbd>S</kbd> |
| Intersect | <kbd>⌥</kbd><kbd>⇧</kbd><kbd>I</kbd> |
| Exclude | <kbd>⌥</kbd><kbd>⇧</kbd><kbd>E</kbd> |
| Flatten | <kbd>⌘</kbd><kbd>E</kbd> |
| Ungroup | <kbd>⇧</kbd><kbd>⌘</kbd><kbd>G</kbd> |

## Catches

- **The mask is the lowest layer, not the one you clicked first.** Check the order in the layers list before you press <kbd>⌃</kbd><kbd>⌘</kbd><kbd>M</kbd>.
- **Masks need a parent without auto layout.** Auto layout would move the mask away from what it clips. Mask in a plain frame, or turn on **Ignore auto layout** for those layers first.
- **Layers to mask or combine must share a parent.** Layers from two different frames get a toast instead.
- **Text cannot go into a boolean.** Only shapes, lines, vectors and other boolean groups can.
- **Subtract depends on the order.** The bottom shape is what is kept; swap the order in the layers list if the wrong part disappears.
