Tag icons component

(Penar Musaraj) #1



Installation instructions: How do I install a Theme or Theme Component?

What this does?

This component allows tags to have an icon next to the tag label. Here is an example of how this would look, with tag style set to the default (simple):

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


Configuration is pretty straightforward:

See also the Category Icons component, which does the same thing for categories.

Add a custom fontawesome icon and color to your tag
Events Plugin :calendar:
Add a custom fontawesome icon and color to your tag

Does this also work with custom svg?

(Penar Musaraj) #4

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 for details.

(Fellowship Forums) #5

Wow, this is awesome!

Can this be expanded to work with tag groups? (All tags within a specific tag group would get a specific icon)

1 Like
(Penar Musaraj) #6

At this time, no, it can’t work with tag groups because the component doesn’t have access to the makeup of tag groups.

1 Like
(Fellowship Forums) #7

Okay. We have a large number of tags (over 200) but will only require 3 or 4 different icons.

Is there a way we could assign one icon for multiple tags, without having a separate row for each tag?

Let me know if this makes sense


(Penar Musaraj) #8

No, there is no way of doing that right now.

1 Like
(Chris Klugewicz) #9

I love this idea, but for the life of me, I can’t get the icons to display. I’m on Discourse 2.2.1, and I’ve got the theme component installed and added under my main theme. But no icon shows up on the tags:


Here’s what things look like in settings:

For the component:

And for the theme:

I know I must be missing something obvious, but I can’t for the life of me figure out what. Can someone help?

(Penar Musaraj) #10

You need to be on the very latest tests-passed, I only added support for this in core yesterday. A rebuild should do it.

(Chris Klugewicz) #11

Ah, ok! That answers that question! Thank you!

1 Like
(Mindaugas Bartusevičius) #12

not working for me … what am I doing wrong ? :smiley:

(Sam Saffron) #13

You must be running latest tests-passed of Discourse. Upgrade Discourse to latest.

1 Like
(David Kingham) #14

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?

(Penar Musaraj) #15

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

(David Kingham) #21

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