<?xml version="1.0" encoding="utf-8"?>

Using masks in Figma is similar to viewing a landscape through a window — you decide the window's shape and size and choose which part of the scenery to show, with the rest remaining hidden yet untouched.

This technique is invaluable in UX/UI design. For example, when creating user avatars for a chat app, circular masks can neatly display users' profile pictures. In a product catalog, square masks can uniformly frame product images, offering a clean, professional look. Masks provide a way to control visuals without altering the original images, keeping your designs flexible and your images unchanged.

Exercise #1

How masks work

How masks work

Masks let you shape how parts of your design look by using layers like shapes, text, or pictures. Think of a mask as a stencil placed over your design elements. Whatever part of the design is under the mask shows through, while the rest is hidden.

These masks are easy to find in the Layers panel because they're marked with an icon of interlaced shapes. The layers being shaped by the mask have an upward arrow.

Here's a simple way to understand it: masks act like a layer sitting just under the ones they affect. They change everything directly above them until they hit another mask or the edge of their group. This makes it easy to mix and match different parts of your design creatively.

Exercise #2

Creating a mask

Creating a mask

Creating masks in Figma is a straightforward way to control the visibility of elements in your design. Start by placing the shape or object you want to use as a mask behind the elements you wish to mask. Then, select all these layers together.

To make the mask, hit the icon of interlaced shapes on the Design Panel on the right or use the shortcut:

  • Mac: Control Command M
  • Windows: Ctrl Alt M

By default, your mask is set to Alpha, but you can change it. Click the mask layer and pick a new type from the Mask dropdown in the Design panel. Hover over options to preview them directly on your canvas.

Pro Tip: To add more layers to your mask, drag them into the mask group in the Layers panel.

Exercise #3

Alpha type

Alpha type

Masks with alpha channels let you control the transparency levels of colors, images, or objects, offering several practical applications:

  • Transparency import: Import images like PNGs, GIFs, or WebP files with alpha channels to incorporate complex transparency effortlessly, such as logos with fading edges.
  • Feathering with ease: Feathering softens the edges of images or text by blurring them slightly, making transitions smoother and more natural. Alpha masks make applying this effect straightforward.
  • Depth and shadows: Use alpha masks to add realistic shadows and depth, enhancing the 3D appearance of your designs.
  • Opacity: With alpha masks, you can create designs featuring fills, strokes, and gradients with variable opacity, allowing for intricate effects like buttons with transparent borders that blend seamlessly into the interface.

Exercise #4

Vector type

Vector type

Vector masks use shape outlines to define visible areas in your designs, disregarding any translucency in the mask's fill or stroke. Essentially, if a mask's outline is present, the area it covers appears fully, without any transparency.

This tool is ideal for creating crisp, clean layers in your projects. For instance, designers can craft intricate icons by overlaying shapes and using vector masks to reveal only specific parts, ensuring sharp edges and precise detailing. It's also handy in logo design, where overlapping elements can be cleanly separated, maintaining the logo's integrity across various backgrounds.

Exercise #5

Luminance type

Luminance type

Luminance masks use brightness levels to control what parts of a layer are visible, essentially using light to unveil your design. Bright areas in the mask show more of the layer beneath, while darker areas conceal it. Think of it like a dimmer switch: the brighter the mask, the more you see underneath.

This tool is perfect for creating depth or focus in images, like highlighting a subject in a photo while subtly fading the background. It's also great for UI design, where you might want to draw attention to active elements by making them brighter and more visible.

Exercise #6

Resizing and moving masks

Resizing and moving masks

Masks and the layers they cover operate independently, giving you flexibility in adjusting your design. If you move or resize a mask, the layers beneath it won't be disturbed. The same is true if you adjust the masked layers, and the mask stays put. Think of them as siblings rather than parent and child. They don't automatically influence each other like frames or groups.

This independence is useful when fine-tuning details. For instance, you might want to shift a photo within a circular mask to focus on a specific part without altering the mask's size or position. This separate control ensures precision and ease in your design process, allowing you to adjust elements exactly how you envision them.

Exercise #7

Avatar mask

Avatar mask

Masks are great for creating profile pictures in social media apps, user icons in dashboards, or character images in games.

Here are the steps to create an avatar:

  1. Select a shape for the avatar, like a circle or square, to serve as the mask. This shape defines the visible area of the avatar.
  2. Place a photo or an illustration of the person you want to feature as the avatar in front of the mask shape
  3. Select both the shape and the image.
  4. Click the Use as Mask option in the Design Panel on the right. The image will now be clipped to the shape of the mask, showing only the part of the image within the mask's boundaries.

You can resize or reposition the mask to best fit the image, or adjust the image within the mask for the perfect framing. This technique is great for profile pictures in social media apps, user icons in dashboards, or character images in games, adding a clean, customized appearance to your design.

Exercise #8

Text mask

Text mask

Creating a text mask in Figma allows you to fill your text with images or patterns, adding a creative twist to your designs.

Follow these steps to create a text mask:

  1. Begin by typing out your text.
  2. Adjust the font and size to your liking.
  3. Place your chosen image or pattern above the text layer. This will be what fills the text.
  4. Once your text and image are ready, select both layers.
  5. Use the Use as Mask option in the right sidebar.

The text will now act as a mask, with the image visible only within the text outlines. You can move or resize the image for different effects, like a landscape picture filling in a bold title, or a geometric pattern giving life to a simple quote. This technique is perfect for eye-catching headings, dynamic logos, or engaging promotional graphics, making your text a visual centerpiece.

Complete this lesson and move one step closer to your course certificate