> ## Documentation Index
> Fetch the complete documentation index at: https://docs.visualradioassist.live/llms.txt
> Use this file to discover all available pages before exploring further.

> ## Agent Instructions
> Use the names from the glossary at https://docs.visualradioassist.live/glossary: Audio Manager (two words), command (never commando), on air and off air (never live) for programs and studios, and server apps for the VRA apps installed in the studio.
> Say which app an answer applies to, like VRA Cloud, the Core or the Output Player, and the version when the page names one.
> Only give settings, values and steps that are in these docs. Never invent one. If the docs don't cover it, say so.
> When the docs don't answer the question, send the user to Visual Radio Assist support at https://cloud.visualradioassist.live/support.

# Develop Visual Graphics

> Customize your Visuals with CSS selectors, custom code, and animation libraries.

> [card] [Layer Transition Lifecycle for CSS](https://docs.visualradioassist.live/develop-with-vra/develop-visual-graphics/layer-transition-lifecycle-for-css.md)
>
> The CSS classes that mark each stage of a layer's transition.

> [card] [GSAP Animations with Visual Radio Graphics](https://docs.visualradioassist.live/develop-with-vra/develop-visual-graphics/gsap-animations-with-visual-radio-graphics.md)
>
> Animate your Visuals with GSAP from the Designer's custom JS.

## CSS Selectors

**Default selectors:**

* `.canvas .layer`  Canvas wrapper with reference to the layers

  > [!WARNING]
  >
  > **Broken:** `#visual_canvas`
  >
  > Due to the nature of the new Visual Canvas specification for the Visual Compositions Visual Canvas'es have to be unique, so we're adding a bit of the ID of the Visual to the `#visual_canvas_{#}` selector which is dynamic.

**Layer**

* `.layer`  Wraps layer, with **Layer' CSS Selector** applied
  * `# ID Selector` for Layer (customizable)

    ![](https://mintcdn.com/visualradioassist/1LQdAqmw3LInyH_s/images/develop-with-vra/develop-visual-graphics/1.png?fit=max\&auto=format\&n=1LQdAqmw3LInyH_s\&q=85\&s=b5d57bdb9d5ecc89b3b0c45bcad10f41)
  * `.type-{type}` → contains layer **type** (`.layer.type-text` = a text layer)
    * `schedulingmedia`
    * `text`
    * `media`
    * `html`
    * `snippet`

**Elements**

* Text
  * `.h1` - `.h6` + `.p` are classes that are added to the layer element

## Customize Visual

### Header HTML

Add libraries to your Output

**Included Libraries by default**

* ~~Tailwind CSS (CSS styling)~~
* [GSAP](https://gsap.com/)

→ See **CSS Selectors** for layer' element selectors&#x20;

### Body Javascript

Raw Javascript to be added at the end of the Body

**Events**

To integrate your custom logic with the described Layer transition states ([see](https://docs.visualradioassist.live/visual-designer.md) Designer) Events are dispatched on `activation` and `hide` events.
When an layer is activated the `layer-activated` event is triggered on the `.layer` HTML element. When hidden the `layer-hidden` event is triggered:

```javascript theme={null}
visualLink.getCanvasElement("layer-id")
	.addEventlistener("layer-activated", function(){
	// do special stuff
})
visualLink.getCanvasElement("layer-id")
	.addEventlistener("layer-hidden", function(){
	// do special stuff
})
```

### Body-end HTML

HTML code (CSS, etc.) that is added to the end of the body (`js` wont be evaluated, script tags will)
Adding animations for yet to be rendered elements

### Custom CSS

Appended at the end of the `header`  after `Header HTML` .

> [!WARNING]
>
> **Only `em` is valid**
>
> Avoid using **`px`** or **`rem`**, as they do not consistently produce predictable results across contexts. Prefer **`em`**, which provides more reliable and context-aware scaling.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.