> 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/templates.md).

# Templates

Templates can be used to create shortcuts or presets for multiple tags. You define a new tag that gets replaced by some other tags before the text is processed by the animated text element.

<figure><img src="/files/iaOy2OUpt1q3oS8qnO2i" alt=""><figcaption><p>Templates can be found in the General section of your Text Animation Settings</p></figcaption></figure>

The replacement is done in a pre-processing step via string replacement. It's simple but powerful.

## Example

Let's start with a template like this:

| Property    | Value                      |
| ----------- | -------------------------- |
| Tag         | angry                      |
| Opening Tag | \<b>\<color="red">\<shake> |
| Closing Tag | \</shake>\</color>\</b>    |

If you use the tag like this:

`Hey, I'm a <angry>very angry</angry> character! I bet you're <wiggle>scared</wiggle>.`&#x20;

The `<angry>` and `</angry>` tags will be replaced like this:

`Hey, I'm a <b><color="red"><shake>very angry</shake></color></b> character! I bet you're <wiggle>scared</wiggle>.`&#x20;

Very intimidating. Since it's just string replacement, you can add any tags you want. Rich text tags, built-in animation tags, custom animations, etc.

{% hint style="info" %}
If you want to go crazy, you could even include template tags *inside* other style tags, but it will only work with some extra care: Each style is only replaced **once**. They get executed sequentially. That means if your first style contains a tag for your second style, the replaced tags will get replaced too, but it won't work the other way around.
{% endhint %}
