How to add an icon to custom module

I found the solution, mentioned here, although a reference should be added to the docs on the Modules and Widgets section.

Basically, the ModuleWidget class creates an empty CSS class called .module-icon-<module_name>, which you can override with the override.css of your custom theme. I added a content property with the desired unicode icon from FontAwesome, and now I have an icon for the custom module.

1 Like