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

# Template

> Appliquer une transformation de template au format sprintf

## Présentation

La transformation `template` applique une chaîne de template avec substitution de variables en utilisant le format [sprintf](https://github.com/alexei/sprintf.js).

## Syntaxe

```text theme={"theme":{"light":"github-light","dark":"github-dark"}}
template(<variable>, template="")
```

## Paramètres

| Paramètre  | Type   | Requis | Description                                                                                     |
| ---------- | ------ | ------ | ----------------------------------------------------------------------------------------------- |
| `variable` | any    | Oui    | La variable à utiliser dans le template                                                         |
| `template` | string | Oui    | La chaîne de template au format sprintf (par ex., `%s` pour les chaînes, `%d` pour les entiers) |

## Exemples

```text theme={"theme":{"light":"github-light","dark":"github-dark"}}
template(<variable>, template="Hello %s!")
template(<variable>, template="Value: %d items")
```
