> For the complete documentation index, see [llms.txt](https://docs.papillon.bzh/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.papillon.bzh/design/components/typography.md).

# Typography

Typography est un remplacement de [Text](https://reactnative.dev/docs/text) qui applique automatiquement le thème et les règles d'interface de Papillon UI sur l'ensemble de l'UI Kit.

<figure><picture><source srcset="https://872099368-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FCYvYwrd5AG2cytF3fLrG%2Fuploads%2FtLwY6mfJR6FflXljktAp%2Fimage.png?alt=media&amp;token=e3c7b368-cf4e-4f09-b24d-a28031912a09" media="(prefers-color-scheme: dark)"><img src="https://872099368-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FCYvYwrd5AG2cytF3fLrG%2Fuploads%2FJ5OZ1VjkZFgXOgwN9mem%2Fimage.png?alt=media&amp;token=55a427b3-cdf1-4a86-92bd-3ae246401a35" alt=""></picture><figcaption></figcaption></figure>

## Exemple

Cet exemple affiche un titre de la couleur principale.

{% columns %}
{% column width="58.333333333333336%" %}

<pre class="language-tsx" data-title="example.tsx" data-overflow="wrap" data-line-numbers><code class="lang-tsx">&#x3C;Typography
<strong>  variant="h1"
</strong><strong>  color="primary"
</strong>>
  Lorem ipsum
&#x3C;/Typography>
</code></pre>

{% endcolumn %}

{% column width="41.666666666666664%" %}

<figure><picture><source srcset="https://872099368-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FCYvYwrd5AG2cytF3fLrG%2Fuploads%2FJHHie9zCGoZCVXTlwbjR%2Fimage.png?alt=media&amp;token=3b79a6fa-50e6-4cc1-851b-52190af023ad" media="(prefers-color-scheme: dark)"><img src="https://872099368-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FCYvYwrd5AG2cytF3fLrG%2Fuploads%2FHaWIaRkCMFBFvn1NHHzL%2Fimage.png?alt=media&amp;token=70cf7c6b-24b0-4414-b8c6-b8769b1aa97f" alt=""></picture><figcaption></figcaption></figure>
{% endcolumn %}
{% endcolumns %}

<details>

<summary>Note sur les polices pré-installées</summary>

En plus des polices préinstallées dans l'OS, Papillon importe [SN Pro](https://supernotes.app/open-source/sn-pro/) sous les noms suivants :

* light
* regular
* medium
* semibold
* bold

</details>

## Propriétés

{% hint style="success" %}
Typography étend [Text](https://reactnative.dev/docs/text) et dispose de toutes ses propriétés
{% endhint %}

### `variant`

Style du texte (parmi les variantes disponibles)

<details>

<summary>Variantes disponibles</summary>

* Corps de texte
  * `body1`
  * `body2`
* Titres
  * `h1`
  * `h2`
  * `h3`
  * `h4`
  * `h5`
  * `h6`
* UI
  * `title`
  * `caption`
  * `button`
  * `navigation`

</details>

| Type   | Valeur par défaut |
| ------ | ----------------- |
| String | body1             |

### `color`

Couleur du texte (parmi les couleurs par défaut ou custom)

<details>

<summary>Couleurs de base</summary>

* `primary`
* `text`
* `secondary`
* `light`
* `danger`

</details>

| Type                    | Valeur par défaut |
| ----------------------- | ----------------- |
| Couleur (HEX) ou String | text              |

### `align`

Alignement du texte :

* `left`
* `center`
* `right`

| Type   | Valeur par défaut |
| ------ | ----------------- |
| String | left              |

### `inline`

Indique si le texte ne doit PAS prendre toute la largeur

| Type    | Valeur par défaut |
| ------- | ----------------- |
| Booléen | false             |

### `nowrap`

Empêche le texte de passer sur plusieurs lignes

| Type    | Valeur par défaut |
| ------- | ----------------- |
| Booléen | false             |

### `weight`

Police d'écriture (et non l'épaisseur puisqu'elle ne fonctionne pas sur les fonts custom)

| Type   |
| ------ |
| String |


---

# 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://docs.papillon.bzh/design/components/typography.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.
