To mask an image within a rectangle in Figma, you need to place the image and the rectangle on top of each other and use the rectangle as a mask. Here's a breakdown of the steps using the principles of masking described in the provided reference:
Steps to Mask an Image with a Rectangle in Figma
- Create a Rectangle: Use the rectangle tool to draw a rectangle on your Figma canvas. This rectangle will serve as the mask.
- Place the Image: Import or place the image you want to mask above the rectangle on the canvas. Make sure it is in the correct location because the mask is based on the position of the rectangle.
- Adjust Image Position: Position the image so that the portion you want to be visible is within the bounds of the rectangle.
- Select Both Objects: Select both the image and the rectangle. You can do this by clicking on one, holding down the shift key, and then clicking on the other.
- Use as Mask: Right-click on the selected elements and choose "Use as mask." Alternatively, click the "Mask" button in the toolbar at the top.
- Final Adjustments: Now your image is masked by the shape of the rectangle. You can adjust the position of the image within the mask by selecting only the image within the layers panel and moving it around. You can also make adjustments to the size of the rectangle as needed.
Key Considerations:
- Layer Order: The rectangle (mask) must be beneath the image in the layers panel.
- Masking Types: Figma has two types of masking: Use as mask and boolean operation mask. For basic image masking, the "Use as mask" option is ideal. The reference, which describes masking in general, is applicable to using shapes for masking.
Example Use Cases
- Profile Pictures: Create a consistent shape for profile pictures by masking with a circle or rectangle, as demonstrated in the reference.
- Image Cropping: Quickly crop images by using rectangles as masking shapes.
- Creating Unique Layouts: Create visual interest in your design by using geometric shapes to mask images, such as creating patterns for social media posts.
By following these steps you can easily mask an image within a rectangle in Figma, enhancing your designs and providing flexibility in image layouts.