> For the complete documentation index, see [llms.txt](https://docs.stixgames.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.stixgames.com/text-animations/events/custom-events.md).

# Custom Events

You can emit custom events by using the `<event="customEvent">` tag. Adding this tag will create a `CustomEvent` with the `name` field set to "customEvent".&#x20;

For example, the following text would emit two events:

```
<event="wave">Hi! I hope you enjoy using <event="jump"><bounce>animations</bounce>
```

At the start it emits a `CustomEvent` with the name "wave", later it emits an event with the name "jump" right when the word "animations" starts to appear.

{% hint style="warning" %}
Custom events only work when you have Text Appearance enabled in your [Text Animation Settings](/text-animations/text-animation-settings.md).
{% endhint %}

## Reacting to events with the Animated Text Events component

<figure><img src="/files/KcAUWAINzpWGW04GcbUl" alt=""><figcaption></figcaption></figure>

You can add as many custom events as you want. Use the `On Custom Event` UnityEvent to interact with your scene.

## Reacting to events from C\#

You can add an event handler to the `customEventTriggered` event on your animated visual elements.

```csharp
var animatedLabel = uiDocument.rootVisualElement.Q<AnimatedLabel>("animated-label");
animatedLabel.customAnimationTriggered += YourEventHandler;
```
