Icon Macro

Last modified by Admin on 2024/05/24 03:42

cogMacro to display icons.
Developed by

XWiki Development Team

0 Votes
LicenseGNU Lesser General Public License 2.1
Bundled With

XWiki Standard


XWiki 14.10.x since 14.10.6, >= 15.2 RC1

Installable with the Extension Manager


The icon macro displays an icon of the current icon set or a chosen icon set, with an optional fallback to the default icon theme when the icon doesn't exist. It can be used to add icons to UI elements and, e.g., also for documentation purposes to show which icon a user needs to click.


The basic usage is to just specify an icon name to display an icon from the current icon theme, all other parameters are optional. Refer to the documentation of the icon theme application for a list of icons and icon sets.

From WYSIWYG Editor



From Wiki Syntax

{{displayIcon name="home"/}}

Example output:

Parameter definitions

NameOptionalAllowed valuesDefault valueDescription
namenoan icon's name The name of the icon. See the icon theme application for available icons.
iconSetyesan icon set's namethe current icon setThe name of the icon set. See the icon theme application for available icon sets.
fallbackyestrue/falsetrueIf the icon shall be loaded from the default icon set when the icon or icon set is not available, true by default.

Prerequisites & Installation Instructions

We recommend using the Extension Manager to install this extension (Make sure that the text "Installable with the Extension Manager" is displayed at the top right location on this page to know if this extension can be installed with the Extension Manager).

You can also use the manual method which involves dropping the JAR file and all its dependencies into the WEB-INF/lib folder and restarting XWiki.


Dependencies for this extension (org.xwiki.platform:xwiki-platform-icon-macro 16.3.1):

Get Connected