# Tag Icons

**URL:** https://meta.discourse.org/t/tag-icons/109757
**Category:** Theme component
**Tags:** official, tag-icons
**Created:** [February 21, 2019, 1:56pm UTC](https://meta.discourse.org/t/tag-icons/109757 "2019-02-21T13:56:48Z")
**Posts on this page:** 20
**Page:** 1

<div class="post-metadata">

### Author: ![Discourse](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/discourse/32/148734_2.png) [@Discourse](https://meta.discourse.org/u/Discourse)
#### Post date: [February 21, 2019, 1:56pm UTC](https://meta.discourse.org/t/tag-icons/109757/1 "2019-02-21T13:56:48Z")

</div>

| | | |
| --- | --- | --- |
| :discourse2: | **Summary** | **Tag Icons** allows tags to have an icon next to the tag label. |
| 👓 | **Preview** | [Preview on Discourse Theme Creator](https://discourse.theme-creator.io/theme/Discourse/tag-icons) |
| 🛠 | **Repository Link** | [https://github.com/discourse/discourse-tag-icons](https://github.com/discourse/discourse-tag-icons) |
| 📖 | **New to Discourse Themes?** | [Beginner’s guide to using Discourse Themes](https://meta.discourse.org/t/beginners-guide-to-using-discourse-themes/91966) |

Install this theme component

> [@](#):
>
> :discourse2: As this is an #official theme component maintained by the Discourse team, #Support, #Contribute > Bug, #Contribute > UX, and #Contribute > Feature requests can be made in the respective categories here on Meta, and tagged with the appropriate theme component tag. Click on a link below to get one started. 👍
> 
> [❓&nbsp; **Support**](https://meta.discourse.org/new-topic?category_id=6&tags=tag-icons "Ask for support on configuring and using Tag Icons") [🐛&nbsp; **Bug**](https://meta.discourse.org/new-topic?category_id=1&tags=tag-icons "A bug report means something is broken, preventing normal/typical use of the theme component") [👀&nbsp; **UX**](https://meta.discourse.org/new-topic?category_id=9&tags=tag-icons "Discussion about the user interface of Tag Icons, and how features are presented (including language and UI elements)") [💡&nbsp; **Feature**](https://meta.discourse.org/new-topic?category_id=2&tags=tag-icons "Discussion about how existing Tag Icons features can be improved or enhanced, and how proposed new features could work")

### Features

Here is an example of how this would look, with tag style set to the default (simple):

 ![image](https://global.discourse-cdn.com/meta/original/3X/9/f/9f0b34253dbed2a6f4cd8900959a98102fb026e9.png)

Here is how this looks with tag style set to `box`:

 ![image](https://global.discourse-cdn.com/meta/original/3X/2/1/2150d32bdb06f6377499235b9ff86bdc358fd16b.png)

### Settings

| Name | Description |
| --- | --- |
| tag icon list | Enter comma-delimited configuration for tags, in the format “tag-slug,icon,iconColor”. Icon color is optional. |
| svg icons | List of [FontAwesome 6](https://fontawesome.com/search?o=r&m=free&new=yes) icons used in this theme component |

  

> :discourse2: **Hosted by us?** Theme components are available to use on our Standard, Business, and Enterprise plans.

> Last edited by @tobiaseigen 2025-08-27T06:57:11Z
> 
> > **Check document**
> >
> > Perform check on document:

---

<div class="post-metadata">

### Author: ![TheBestPessimist](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/thebestpessimist/32/247704_2.png) [@TheBestPessimist](https://meta.discourse.org/u/TheBestPessimist)
#### Post date: [February 21, 2019, 1:58pm UTC](https://meta.discourse.org/t/tag-icons/109757/3 "2019-02-21T13:58:59Z")

</div>

Does this also work with custom svg?

---

<div class="post-metadata">

### Author: ![pmusaraj](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/pmusaraj/32/119489_2.png) [@pmusaraj](https://meta.discourse.org/u/pmusaraj)
#### Post date: [February 21, 2019, 2:04pm UTC](https://meta.discourse.org/t/tag-icons/109757/4 "2019-02-21T14:04:11Z")

</div>

Yes, but you would need to register the custom SVG in a plugin (themes should soon also be able to add custom icons to the SVG sprite set). See [Introducing Font Awesome 5 and SVG icons - #61 by pmusaraj](https://meta.discourse.org/t/introducing-font-awesome-5-and-svg-icons/101643/61) for details.

---

<div class="post-metadata">

### Author: ![davidkingham](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/davidkingham/32/119528_2.png) [@davidkingham](https://meta.discourse.org/u/davidkingham)
#### Post date: [March 19, 2019, 12:46am UTC](https://meta.discourse.org/t/tag-icons/109757/14 "2019-03-19T00:46:50Z")

</div>

Now that custom icons in themes has been merged is it possible to use FA Pro icons with this or does the component need to be updated?

---

<div class="post-metadata">

### Author: ![pmusaraj](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/pmusaraj/32/119489_2.png) [@pmusaraj](https://meta.discourse.org/u/pmusaraj)
#### Post date: [March 19, 2019, 12:47am UTC](https://meta.discourse.org/t/tag-icons/109757/15 "2019-03-19T00:47:48Z")

</div>

Component doesn’t need to be updated, if you add custom icons via theme/plugin they will be available to the component.

---

<div class="post-metadata">

### Author: ![davidkingham](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/davidkingham/32/119528_2.png) [@davidkingham](https://meta.discourse.org/u/davidkingham)
#### Post date: [March 31, 2019, 11:30pm UTC](https://meta.discourse.org/t/tag-icons/109757/21 "2019-03-31T23:30:40Z")

</div>

Could the icon be added to the dropdown menu as well?

 ![image](https://global.discourse-cdn.com/meta/original/3X/6/c/6c75e4306bc3b104796cee128c6590112c7fa149.jpeg)

---

<div class="post-metadata">

### Author: ![AntiMetaman](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/antimetaman/32/186978_2.png) [@AntiMetaman](https://meta.discourse.org/u/AntiMetaman)
#### Post date: [July 21, 2020, 3:57pm UTC](https://meta.discourse.org/t/tag-icons/109757/47 "2020-07-21T15:57:17Z")

</div>

This allows one to add custom icons to tag, but what if I wanted to change the color of the box of the tag?

---

<div class="post-metadata">

### Author: ![pmusaraj](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/pmusaraj/32/119489_2.png) [@pmusaraj](https://meta.discourse.org/u/pmusaraj)
#### Post date: [July 21, 2020, 4:06pm UTC](https://meta.discourse.org/t/tag-icons/109757/48 "2020-07-21T16:06:30Z")

</div>

You can do that with CSS, for example, the code below will set the “theme-component” text color to red:

```plaintext
.extra-info-wrapper .discourse-tag[data-tag-name="theme-component"] {
color: red !important;
}

```

(This is just for illustrative purposes only, you’ll need to figure out your own CSS.)

---

<div class="post-metadata">

### Author: ![AntiMetaman](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/antimetaman/32/186978_2.png) [@AntiMetaman](https://meta.discourse.org/u/AntiMetaman)
#### Post date: [July 21, 2020, 4:11pm UTC](https://meta.discourse.org/t/tag-icons/109757/49 "2020-07-21T16:11:13Z")

</div>

I see thanks. I just have to list every tag I have in the CSS by name and specify the color. Would be nice though if I could do this from the admin panel like with the theme components using a comma separated list and providing the hex code just like for the icons.

Is there a way I can set a color for all tags in a tag group via CSS?

---

<div class="post-metadata">

### Author: ![HeyRR](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/heyrr/32/192157_2.png) [@HeyRR](https://meta.discourse.org/u/HeyRR)
#### Post date: [August 29, 2020, 6:39pm UTC](https://meta.discourse.org/t/tag-icons/109757/50 "2020-08-29T18:39:53Z")

</div>

I ended up getting something like this: ![image](https://global.discourse-cdn.com/meta/original/3X/a/6/a6860bca49779619f3b6f6fa407b909a632714bf.png) (The default tag icon is still here)

Does anyone see this kind of result?

---

<div class="post-metadata">

### Author: ![pmusaraj](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/pmusaraj/32/119489_2.png) [@pmusaraj](https://meta.discourse.org/u/pmusaraj)
#### Post date: [August 31, 2020, 12:15pm UTC](https://meta.discourse.org/t/tag-icons/109757/51 "2020-08-31T12:15:24Z")

</div>

Look for “tag style” in your site settings, and change it to simple, that will remove the grey bullets.

---

<div class="post-metadata">

### Author: ![HeyRR](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/heyrr/32/192157_2.png) [@HeyRR](https://meta.discourse.org/u/HeyRR)
#### Post date: [August 31, 2020, 5:32pm UTC](https://meta.discourse.org/t/tag-icons/109757/52 "2020-08-31T17:32:54Z")

</div>

I see, thanks, but I will need the default grey bullets for all other tags. I achieved this by remove that bullets for specific tag:

```css
a[data-tag-name="test1"]::before {
    display:none!important;
}

```

![image](https://global.discourse-cdn.com/meta/original/3X/5/6/56938cab27af2f2fecdda4fe935f8add5d1792e5.png)

---

<div class="post-metadata">

### Author: ![sebastianh](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/sebastianh/32/40415_2.png) [@sebastianh](https://meta.discourse.org/u/sebastianh)
#### Post date: [October 29, 2020, 5:51pm UTC](https://meta.discourse.org/t/tag-icons/109757/53 "2020-10-29T17:51:53Z")

</div>

Looks like a fantastic tweak. Question for advice to the author: I am thinking of pimping my bland tags, some of which I use to tag posts by language (so I have tags “castellano”, “deutsch” etc.), with little country flags. Would uploading a custom .svg as described above be the way or are there preconfigured iconsets or maybe discourse-built-in emoji-sets that could be used?

---

<div class="post-metadata">

### Author: ![pmusaraj](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/pmusaraj/32/119489_2.png) [@pmusaraj](https://meta.discourse.org/u/pmusaraj)
#### Post date: [October 29, 2020, 6:08pm UTC](https://meta.discourse.org/t/tag-icons/109757/54 "2020-10-29T18:08:33Z")

</div>

An emoji would make sense for country flags, but this component does not use emojis, it uses icons from an icon set like Font Awesome.

You can try adding the emoji directly in the tag label. I tried this locally, and the tricky thing is that tags can’t have spaces. An example:

 ![image](https://global.discourse-cdn.com/meta/original/3X/e/0/e00b180f402cab57e349ce39d55783a4bfd8ff92.png)

If you are ok with the dash, that’s the way to go.

---

<div class="post-metadata">

### Author: ![sebastianh](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/sebastianh/32/40415_2.png) [@sebastianh](https://meta.discourse.org/u/sebastianh)
#### Post date: [October 29, 2020, 6:20pm UTC](https://meta.discourse.org/t/tag-icons/109757/55 "2020-10-29T18:20:25Z")

</div>

Oh wow that is actually rather neat. Minus the dash 🙂 but I could probably live with it. Might even be worth trying a tag that is just a flag emoji…

---

<div class="post-metadata">

### Author: ![pmusaraj](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/pmusaraj/32/119489_2.png) [@pmusaraj](https://meta.discourse.org/u/pmusaraj)
#### Post date: [October 29, 2020, 6:22pm UTC](https://meta.discourse.org/t/tag-icons/109757/56 "2020-10-29T18:22:00Z")

</div>

Yes, just an emoji is cool… but you won’t be able to easily find that from a search in the tag dropdown (when posting).

---

<div class="post-metadata">

### Author: ![sebastianh](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/sebastianh/32/40415_2.png) [@sebastianh](https://meta.discourse.org/u/sebastianh)
#### Post date: [October 29, 2020, 6:27pm UTC](https://meta.discourse.org/t/tag-icons/109757/57 "2020-10-29T18:27:47Z")

</div>

Ok just one more semi-stupid question: how do I get the emoji to work as you did above with the francais? I tried creating a tag "`:sweden:-svenska"` but it doesn’t translate to the swedish flag

---

<div class="post-metadata">

### Author: ![pmusaraj](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/pmusaraj/32/119489_2.png) [@pmusaraj](https://meta.discourse.org/u/pmusaraj)
#### Post date: [October 29, 2020, 6:29pm UTC](https://meta.discourse.org/t/tag-icons/109757/58 "2020-10-29T18:29:20Z")

</div>

You need to use an emoji symbol (on mobile, for example, you would switch to the emoji keyboard).

---

<div class="post-metadata">

### Author: ![sebastianh](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/sebastianh/32/40415_2.png) [@sebastianh](https://meta.discourse.org/u/sebastianh)
#### Post date: [October 29, 2020, 6:32pm UTC](https://meta.discourse.org/t/tag-icons/109757/59 "2020-10-29T18:32:17Z")

</div>

Ohhhh I thought the emojis in Discourse. Okay, need to switch to a mobile then. I thought I could somehow use these. It worked thanks!

---

<div class="post-metadata">

### Author: ![renato](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/renato/32/383632_2.png) [@renato](https://meta.discourse.org/u/renato)
#### Post date: [November 29, 2020, 12:28am UTC](https://meta.discourse.org/t/tag-icons/109757/60 "2020-11-29T00:28:17Z")

</div>

> [@Tag Icons working with tag groups](https://meta.discourse.org/t/tag-icons-working-with-tag-groups/272374/6):
>
> The tag groups feature is a nice-to-have for sure, it is a bit tricky and currently I don’t have the time to work on it.

If I understood it right there isn’t an easy way of discovering the group a tag belongs to within the tag renderer?

> [@davidkingham](#):
>
> Could the icon be added to the dropdown menu as well?

This one would be great. I was using a custom CSS approach before and ditched it for this theme component with a [fallback icon](https://github.com/renato/discourse-tag-icons/commit/b1b00720686a535235fdb2c1d0283fa082f6b4f6) for all non-set tags (at least before the support for tag groups) and this is the one thing I miss.

Considering `discourse-category-icons` supports this, I’m guessing the renderer that `replaceCategoryLinkRenderer` replaces is used by the category dropdown while the renderer `replaceTagRenderer` replaces is NOT used by the tag dropdown, right? So maybe this would need a core change? The tag dropdown on the composer is using the replaced renderer, with icons.

[Next page](https://meta.discourse.org/t/tag-icons/109757.md?page=2)
