Retour

Tag (tag)

Le tag catégorise/classe/organise les contenus à l'aide de mots-clés. Il aide les utilisateurs à rechercher et à trouver facilement une information.

Documentation

Tag non cliquable

Tag simple sans interaction

Tag non cliquable sans icône

Label tag

<p class="fr-tag">Label tag</p>

Tag non cliquable icône à gauche

Label tag

<p class="fr-tag fr-icon-arrow-left-line fr-tag--icon-left">Label tag</p>

Tag non cliquable taille SM

Label tag

<p class="fr-tag fr-tag--sm">Label tag</p>

Tag cliquable

La balise utilisée pour le tag cliquable est un "a" s'il s'agit d'un lien (href), si pas de href utiliser "button".

Tag cliquable

<a class="fr-tag" href="#">Label tag</a>

Tag cliquable avec icône

<a class="fr-tag fr-icon-arrow-left-line fr-tag--icon-left" href="#">Label tag</a>

Tag cliquable SM

<a class="fr-tag fr-tag--sm" href="#">Label tag</a>

Tag cliquable accentué

<a class="fr-tag fr-tag--green-emeraude" href="#">Label tag</a>

Tag cliquable désactivé

<a class="fr-tag" aria-disabled="true" role="link">Label tag</a>

Tag bouton cliquable désactivé

<button class="fr-tag" disabled>Label tag</button>

Tag cliquable désactivé SM

<a class="fr-tag fr-tag--sm" aria-disabled="true" role="link">Label tag</a>

Tag sélectionnable

Le tag sélectionnable n'autorise pas l'accentuation.

Tag sélectionnable

<button class="fr-tag" aria-pressed="false">Label tag</button>

Tag sélectionnable avec icone

<button class="fr-tag fr-icon-information-line fr-tag--icon-left" aria-pressed="false">Label tag</button>

Tag sélectionnable taille sm

<button class="fr-tag fr-tag--sm" aria-pressed="false">Label tag</button>

Tag sélectionnable désactivé

<button class="fr-tag" aria-pressed="false" disabled>Label tag</button>

Tag supprimable

Le tag supprimable n'autorise ni accentuation ni icône personnalisée.
Le javascript présent dans l’attribut onclick est donné à titre d’exemple, à vous de l’implémenter dans votre contexte technique.

Tag supprimable

<button class="fr-tag fr-tag--dismiss" onclick="event.preventDefault(); this.parentNode.removeChild(this);" aria-label="Retirer [À MODIFIER - le filtre Label tag]">Label tag</button>

Tag supprimable taille sm

<button class="fr-tag fr-tag--sm fr-tag--dismiss" onclick="event.preventDefault(); this.parentNode.removeChild(this);" aria-label="Retirer [À MODIFIER - le filtre Label tag]">Label tag</button>

Tag supprimable désactivé

<button class="fr-tag fr-tag--dismiss" onclick="event.preventDefault(); this.parentNode.removeChild(this);" aria-label="Retirer [À MODIFIER - le filtre Label tag]" disabled>Label tag</button>

Groupe de tags

Lorsque que l'on a plus d'un tag, il convient d'utiliser un groupe de tags.
La taille de tous les tags peut être définie au niveau du groupe.

Groupe de tags non cliquables

  • Label tag 1

  • Label tag 2

  • Label tag 3

  • Label tag 4

  • Label tag 5

  • Label tag 6

  • Label tag 7

  • Label tag 8

  • Label tag 9

<ul class="fr-tags-group">
    <li>
        <p class="fr-tag">Label tag 1</p>
    </li>
    <li>
        <p class="fr-tag">Label tag 2</p>
    </li>
    <li>
        <p class="fr-tag">Label tag 3</p>
    </li>
    <li>
        <p class="fr-tag">Label tag 4</p>
    </li>
    <li>
        <p class="fr-tag">Label tag 5</p>
    </li>
    <li>
        <p class="fr-tag">Label tag 6</p>
    </li>
    <li>
        <p class="fr-tag">Label tag 7</p>
    </li>
    <li>
        <p class="fr-tag">Label tag 8</p>
    </li>
    <li>
        <p class="fr-tag">Label tag 9</p>
    </li>
</ul>

Groupe de tags non cliquables SM

  • Label tag 1

  • Label tag 2

  • Label tag 3

  • Label tag 4

  • Label tag 5

  • Label tag 6

  • Label tag 7

  • Label tag 8

  • Label tag 9

<ul class="fr-tags-group fr-tags-group--sm">
    <li>
        <p class="fr-tag">Label tag 1</p>
    </li>
    <li>
        <p class="fr-tag">Label tag 2</p>
    </li>
    <li>
        <p class="fr-tag">Label tag 3</p>
    </li>
    <li>
        <p class="fr-tag">Label tag 4</p>
    </li>
    <li>
        <p class="fr-tag">Label tag 5</p>
    </li>
    <li>
        <p class="fr-tag">Label tag 6</p>
    </li>
    <li>
        <p class="fr-tag">Label tag 7</p>
    </li>
    <li>
        <p class="fr-tag">Label tag 8</p>
    </li>
    <li>
        <p class="fr-tag">Label tag 9</p>
    </li>
</ul>

Groupe de tags cliquables

<ul class="fr-tags-group">
    <li>
        <a class="fr-tag" href="[À MODIFIER - url]">Label tag 1</a>
    </li>
    <li>
        <a class="fr-tag" href="[À MODIFIER - url]">Label tag 2</a>
    </li>
    <li>
        <a class="fr-tag" href="[À MODIFIER - url]">Label tag 3</a>
    </li>
    <li>
        <a class="fr-tag" href="[À MODIFIER - url]">Label tag 4</a>
    </li>
    <li>
        <a class="fr-tag" href="[À MODIFIER - url]">Label tag 5</a>
    </li>
    <li>
        <a class="fr-tag" href="[À MODIFIER - url]">Label tag 6</a>
    </li>
    <li>
        <a class="fr-tag" href="[À MODIFIER - url]">Label tag 7</a>
    </li>
    <li>
        <a class="fr-tag" href="[À MODIFIER - url]">Label tag 8</a>
    </li>
    <li>
        <a class="fr-tag" href="[À MODIFIER - url]">Label tag 9</a>
    </li>
</ul>

Groupe de tags cliquables SM

<ul class="fr-tags-group fr-tags-group--sm">
    <li>
        <a class="fr-tag" href="[À MODIFIER - url]">Label tag 1</a>
    </li>
    <li>
        <a class="fr-tag" href="[À MODIFIER - url]">Label tag 2</a>
    </li>
    <li>
        <a class="fr-tag" href="[À MODIFIER - url]">Label tag 3</a>
    </li>
    <li>
        <a class="fr-tag" href="[À MODIFIER - url]">Label tag 4</a>
    </li>
    <li>
        <a class="fr-tag" href="[À MODIFIER - url]">Label tag 5</a>
    </li>
    <li>
        <a class="fr-tag" href="[À MODIFIER - url]">Label tag 6</a>
    </li>
    <li>
        <a class="fr-tag" href="[À MODIFIER - url]">Label tag 7</a>
    </li>
    <li>
        <a class="fr-tag" href="[À MODIFIER - url]">Label tag 8</a>
    </li>
    <li>
        <a class="fr-tag" href="[À MODIFIER - url]">Label tag 9</a>
    </li>
</ul>

Groupe de tags sélectionnables

<ul class="fr-tags-group">
    <li>
        <button class="fr-tag" aria-pressed="false">Label tag 1</button>
    </li>
    <li>
        <button class="fr-tag" aria-pressed="false">Label tag 2</button>
    </li>
    <li>
        <button class="fr-tag" aria-pressed="false">Label tag 3</button>
    </li>
    <li>
        <button class="fr-tag" aria-pressed="false">Label tag 4</button>
    </li>
    <li>
        <button class="fr-tag" aria-pressed="false">Label tag 5</button>
    </li>
    <li>
        <button class="fr-tag" aria-pressed="false">Label tag 6</button>
    </li>
    <li>
        <button class="fr-tag" aria-pressed="false">Label tag 7</button>
    </li>
    <li>
        <button class="fr-tag" aria-pressed="false">Label tag 8</button>
    </li>
    <li>
        <button class="fr-tag" aria-pressed="false">Label tag 9</button>
    </li>
</ul>

Groupe de tags sélectionnables SM

<ul class="fr-tags-group fr-tags-group--sm">
    <li>
        <button class="fr-tag" aria-pressed="false">Label tag 1</button>
    </li>
    <li>
        <button class="fr-tag" aria-pressed="false">Label tag 2</button>
    </li>
    <li>
        <button class="fr-tag" aria-pressed="false">Label tag 3</button>
    </li>
    <li>
        <button class="fr-tag" aria-pressed="false">Label tag 4</button>
    </li>
    <li>
        <button class="fr-tag" aria-pressed="false">Label tag 5</button>
    </li>
    <li>
        <button class="fr-tag" aria-pressed="false">Label tag 6</button>
    </li>
    <li>
        <button class="fr-tag" aria-pressed="false">Label tag 7</button>
    </li>
    <li>
        <button class="fr-tag" aria-pressed="false">Label tag 8</button>
    </li>
    <li>
        <button class="fr-tag" aria-pressed="false">Label tag 9</button>
    </li>
</ul>

Groupe de tags supprimables

<ul class="fr-tags-group">
    <li>
        <button class="fr-tag fr-tag--dismiss" onclick="event.preventDefault(); this.parentNode.removeChild(this);" aria-label="Retirer [À MODIFIER - le filtre Label tag 1]">Label tag 1</button>
    </li>
    <li>
        <button class="fr-tag fr-tag--dismiss" onclick="event.preventDefault(); this.parentNode.removeChild(this);" aria-label="Retirer [À MODIFIER - le filtre Label tag 2]">Label tag 2</button>
    </li>
    <li>
        <button class="fr-tag fr-tag--dismiss" onclick="event.preventDefault(); this.parentNode.removeChild(this);" aria-label="Retirer [À MODIFIER - le filtre Label tag 3]">Label tag 3</button>
    </li>
    <li>
        <button class="fr-tag fr-tag--dismiss" onclick="event.preventDefault(); this.parentNode.removeChild(this);" aria-label="Retirer [À MODIFIER - le filtre Label tag 4]">Label tag 4</button>
    </li>
    <li>
        <button class="fr-tag fr-tag--dismiss" onclick="event.preventDefault(); this.parentNode.removeChild(this);" aria-label="Retirer [À MODIFIER - le filtre Label tag 5]">Label tag 5</button>
    </li>
    <li>
        <button class="fr-tag fr-tag--dismiss" onclick="event.preventDefault(); this.parentNode.removeChild(this);" aria-label="Retirer [À MODIFIER - le filtre Label tag 6]">Label tag 6</button>
    </li>
    <li>
        <button class="fr-tag fr-tag--dismiss" onclick="event.preventDefault(); this.parentNode.removeChild(this);" aria-label="Retirer [À MODIFIER - le filtre Label tag 7]">Label tag 7</button>
    </li>
    <li>
        <button class="fr-tag fr-tag--dismiss" onclick="event.preventDefault(); this.parentNode.removeChild(this);" aria-label="Retirer [À MODIFIER - le filtre Label tag 8]">Label tag 8</button>
    </li>
    <li>
        <button class="fr-tag fr-tag--dismiss" onclick="event.preventDefault(); this.parentNode.removeChild(this);" aria-label="Retirer [À MODIFIER - le filtre Label tag 9]">Label tag 9</button>
    </li>
</ul>

Groupe de tags supprimables SM

<ul class="fr-tags-group fr-tags-group--sm">
    <li>
        <button class="fr-tag fr-tag--dismiss" onclick="event.preventDefault(); this.parentNode.removeChild(this);" aria-label="Retirer [À MODIFIER - le filtre Label tag 1]">Label tag 1</button>
    </li>
    <li>
        <button class="fr-tag fr-tag--dismiss" onclick="event.preventDefault(); this.parentNode.removeChild(this);" aria-label="Retirer [À MODIFIER - le filtre Label tag 2]">Label tag 2</button>
    </li>
    <li>
        <button class="fr-tag fr-tag--dismiss" onclick="event.preventDefault(); this.parentNode.removeChild(this);" aria-label="Retirer [À MODIFIER - le filtre Label tag 3]">Label tag 3</button>
    </li>
    <li>
        <button class="fr-tag fr-tag--dismiss" onclick="event.preventDefault(); this.parentNode.removeChild(this);" aria-label="Retirer [À MODIFIER - le filtre Label tag 4]">Label tag 4</button>
    </li>
    <li>
        <button class="fr-tag fr-tag--dismiss" onclick="event.preventDefault(); this.parentNode.removeChild(this);" aria-label="Retirer [À MODIFIER - le filtre Label tag 5]">Label tag 5</button>
    </li>
    <li>
        <button class="fr-tag fr-tag--dismiss" onclick="event.preventDefault(); this.parentNode.removeChild(this);" aria-label="Retirer [À MODIFIER - le filtre Label tag 6]">Label tag 6</button>
    </li>
    <li>
        <button class="fr-tag fr-tag--dismiss" onclick="event.preventDefault(); this.parentNode.removeChild(this);" aria-label="Retirer [À MODIFIER - le filtre Label tag 7]">Label tag 7</button>
    </li>
    <li>
        <button class="fr-tag fr-tag--dismiss" onclick="event.preventDefault(); this.parentNode.removeChild(this);" aria-label="Retirer [À MODIFIER - le filtre Label tag 8]">Label tag 8</button>
    </li>
    <li>
        <button class="fr-tag fr-tag--dismiss" onclick="event.preventDefault(); this.parentNode.removeChild(this);" aria-label="Retirer [À MODIFIER - le filtre Label tag 9]">Label tag 9</button>
    </li>
</ul>

Paramètres d’affichage

Choisissez un thème pour personnaliser l’apparence du site.