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

# Icon

Icon est un wrapper conçu pour contenir une icône [**Lucide**](https://lucide.dev/icons/) ou une [**Papicon**](https://icons.papillon.bzh/). Celle-ci permet d'avoir d'avantage de contrôle sur l'affichage des icônes.

<figure><picture><source srcset="https://872099368-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FCYvYwrd5AG2cytF3fLrG%2Fuploads%2FPCpijJHShnnYSnQZ4euM%2Fimage.png?alt=media&amp;token=e2680c8f-fb57-4a76-848a-cd474a6cb852" media="(prefers-color-scheme: dark)"><img src="https://872099368-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FCYvYwrd5AG2cytF3fLrG%2Fuploads%2FKwGtyrPMDY8wIVGCr7Gw%2Fimage.png?alt=media&amp;token=a8562f6f-0bcf-436f-848d-c374374a35c7" alt=""></picture><figcaption></figcaption></figure>

## Fonctionnement

{% tabs %}
{% tab title="Avec une Papicon" %}

<pre class="language-tsx"><code class="lang-tsx">import * as Papicons from "@getpapillon/papicons"
import Icon from "@/ui/components/Icon";

<strong>&#x3C;Icon papicon>
</strong><strong>  &#x3C;Papicons.Ghost />
</strong><strong>&#x3C;/Icon>
</strong></code></pre>

{% endtab %}

{% tab title="Avec une icône Lucide" %}

```tsx
import { Ghost } from "lucide-react-native";
import Icon from "@/ui/components/Icon";

<Icon>
  <Ghost />
</Icon>
```

{% endtab %}

{% tab title="Avec une Vector Icon" %}

```tsx
import { FontAwesome5 } from "@react-native-vector-icons/fontawesome5";
import Icon from "@/ui/components/Icon";

<Icon>
  <FontAwesome5 name="ghost" />
</Icon>
```

{% endtab %}
{% endtabs %}

## Propriétés

### `color`

Couleur de fond de l'icône (Ajoute un padding et un fond)

| Type          |
| ------------- |
| Couleur (HEX) |

### `fill`

Couleur de remplissage de l'icône

| Type          | Valeur par défaut                                 |
| ------------- | ------------------------------------------------- |
| Couleur (HEX) | *Couleur du texte selon le thème clair ou sombre* |

### `papicon`

A activer si l'icône est une Papicon pour le fonctionnement d'`Icon`

{% hint style="warning" %}
Cette propriété sera inutile dans une future version des Papicons
{% endhint %}

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

### `size`

Taille de l'icône

| Type   | Valeur par défaut |
| ------ | ----------------- |
| Nombre | 24                |

### `opacity`

Opacité de l'icône

| Type   | Valeur par défaut |
| ------ | ----------------- |
| Nombre | 1                 |


---

# 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/icon.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.
