> For the complete documentation index, see [llms.txt](https://cardstock-studio.gitbook.io/docs/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://cardstock-studio.gitbook.io/docs/design/templates-design-your-cards/components/mask.md).

# Mask

<figure><img src="https://2449056524-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FK6BdQXak9wiY4BdSf9Rq%2Fuploads%2FavkFAs5EissTQYLAR10O%2FScreen%20Recording%202026-05-28%20at%206.30.48%E2%80%AFPM.gif?alt=media&amp;token=5ddbe886-4de3-410d-b23b-335eab8f6961" alt=""><figcaption></figcaption></figure>

<mark style="color:$success;">**Mask**</mark> allows a shape to mask or cut out an image. Just choose the *Source* shape.

<figure><picture><source srcset="/files/kO54OA6Y8nmYRHM4bkWC" media="(prefers-color-scheme: dark)"><img src="https://2449056524-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FK6BdQXak9wiY4BdSf9Rq%2Fuploads%2FPe19eg205fsEqA5cL9sR%2FScreenshot%202026-05-28%20at%206.38.35%E2%80%AFPM.png?alt=media&amp;token=6597fd57-2b79-4879-a3d7-4a6c5f2824e3" alt="" width="301"></picture><figcaption></figcaption></figure>

***

## Rotate

<figure><img src="https://2449056524-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FK6BdQXak9wiY4BdSf9Rq%2Fuploads%2FGWOSeZabswtmHwCqmLIK%2FScreen%20Recording%202026-05-28%20at%206.44.15%E2%80%AFPM.gif?alt=media&amp;token=8e7628df-b7d1-4a5d-80e5-1eb9948d3fc7" alt=""><figcaption></figcaption></figure>

Rotates the source shape.

***

## Scale

<figure><img src="https://2449056524-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FK6BdQXak9wiY4BdSf9Rq%2Fuploads%2FlCXO9LpOkLarsD1OfVVq%2FScreen%20Recording%202026-05-28%20at%206.43.19%E2%80%AFPM.gif?alt=media&amp;token=314ad9a4-c37c-4c96-86d1-e8665cd0c5a1" alt=""><figcaption></figcaption></figure>

Scales the shape. Works well with *Repeat (tile)* toggled on to get a repeating pattern.

***

## Blur

<div><figure><img src="https://2449056524-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FK6BdQXak9wiY4BdSf9Rq%2Fuploads%2F7Cn8DsRcjpxsit2dbr0K%2FScreen%20Recording%202026-05-28%20at%206.46.55%E2%80%AFPM.gif?alt=media&amp;token=e336433d-b5d1-4913-8414-82693a61b6c5" alt=""><figcaption></figcaption></figure> <figure><img src="https://2449056524-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FK6BdQXak9wiY4BdSf9Rq%2Fuploads%2Fr1aZbWQsud12F4lEDNNa%2FScreen%20Recording%202026-05-28%20at%206.51.18%E2%80%AFPM.gif?alt=media&amp;token=588b8422-60b6-48e3-9d7e-7b5a978b60b4" alt=""><figcaption></figcaption></figure></div>

Blurs the shape to produce a softer mask.

***

## Offset X / Offset Y

<figure><img src="https://2449056524-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FK6BdQXak9wiY4BdSf9Rq%2Fuploads%2FyLgIo75i327WTQAG7tnJ%2FScreen%20Recording%202026-05-28%20at%206.47.34%E2%80%AFPM.gif?alt=media&amp;token=5d561625-b4cd-45d4-b074-49bff76d8320" alt=""><figcaption></figcaption></figure>

Offsets the shape relative to the layer area, allowing the shape to be nudged.

***

## Repeat (tile)

<figure><img src="https://2449056524-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FK6BdQXak9wiY4BdSf9Rq%2Fuploads%2FEjpT9AXBeaLqiKB14wIa%2FScreen%20Recording%202026-05-28%20at%206.43.19%E2%80%AFPM.gif?alt=media&amp;token=0f4afe52-b2dd-433c-9624-31787a9ff539" alt=""><figcaption></figcaption></figure>

When true, the shape will repeat within the bounds of the layer area.

***

## Invert

<figure><img src="https://2449056524-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FK6BdQXak9wiY4BdSf9Rq%2Fuploads%2FAlYv82o2NMwwTMspV063%2FScreen%20Recording%202026-05-28%20at%206.30.48%E2%80%AFPM.gif?alt=media&amp;token=13281d5c-3ce6-4aba-8dad-9a37f023ea0c" alt=""><figcaption></figcaption></figure>

Inverts the shape.

***

## Fit to Card

Fits the shape to the card, and keeps it there — moving the layer will not move the Mask shape.

<figure><img src="https://2449056524-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FK6BdQXak9wiY4BdSf9Rq%2Fuploads%2FYpXTqH5gUoXYFstXUwYt%2FScreen%20Recording%202026-05-28%20at%206.48.56%E2%80%AFPM.gif?alt=media&amp;token=1e3a129b-e6f0-423b-b431-0901117f452b" alt=""><figcaption></figcaption></figure>

As the image is moved, the re-draw puts the mask back in the intended "fit to card" position.


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://cardstock-studio.gitbook.io/docs/design/templates-design-your-cards/components/mask.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `build a script that syncs our docs to a CMS` lets GitBook tailor the answer to that use case.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
