> For the complete documentation index, see [llms.txt](https://developer.singular.live/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://developer.singular.live/singular-basics/building-overlays-in-composer/how-to-set-up-layer-logic-to-automate-overlay-transitions.md). Agents can also search and read this documentation through its [MCP server](https://developer.singular.live/~gitbook/mcp).

# How to set up layer logic to automate overlay transitions

Layer logic allows for smooth on-air transitions between overlays that have been assigned to the same layer type.

To show how this works, let's look at an example. Say you're creating overlays for a talk show where the hosts will talk about a variety of subjects. You create a playlist of overlays for the subjects and assign them to the same logic layer. Then every time you send one of these overlays on air, the previous one animates out before the new one animates in.

In this guide, you'll learn how to set up layer logic.

{% hint style="info" %}
To follow along, you'll need a composition. If you don't have one, first learn [how to build a composition](https://developer.singular.live/singular-basics/building-overlays-in-composer/how-to-build-a-composition.md) or [extract a composition from a Singular template](https://developer.singular.live/singular-basics/managing-overlays-in-the-dashboard/how-to-extract-a-composition-from-an-app.md).
{% endhint %}

## How to set up layer logic

1. Open a composition in Composer and open the composition navigator.

   <figure><img src="https://3821697355-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FOb9Y6sfr2vQu3cBPM871%2Fuploads%2Fgit-blob-7cfb2e9342696f6c4e2e792569242af5ebd3781e%2FOpening%20the%20composition%20navigator.png?alt=media" alt=""><figcaption><p>Opening the composition navigator</p></figcaption></figure>
2. In the composition navigator's Logic Layer column, open the drop-down for an overlay.
3. Select the layer of your choice or create a new logic layer by entering a new name in the **new layer** field.

   <figure><img src="https://3821697355-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FOb9Y6sfr2vQu3cBPM871%2Fuploads%2Fgit-blob-99672f90ebe7c81aca9065766af27927101bfe28%2FAdding%20logic%20layers.gif?alt=media" alt=""><figcaption><p>Adding layer logic</p></figcaption></figure>
4. Repeat for any additional layers.

{% hint style="danger" %}
If you build a composition where one layer spills into an area where another layer sits, they will overlap if they're onscreen at the same time. Thus, be mindful of the space that your layers occupy when you're creating and controlling overlays.
{% endhint %}


---

# 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 by asking a question.

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

```
GET https://developer.singular.live/singular-basics/building-overlays-in-composer/how-to-set-up-layer-logic-to-automate-overlay-transitions.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 `automate deployments from our CI pipeline` 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.
