ComboStrap UI - Icon Component


icon is a component that permits to add easily an svg icon such as this one: :


An icon can be seen as a character and is therefore a component that can be used in a line.

The syntax is:

<icon name="[library:]name" />


  • name is the name of the icon
  • library is the optional name of the icon library (if not set, the default is used)

To show a icon:

  • Go to a library
  • Select your icon and remember its name
  • If you are not using the default library, add the library name as prefix


We supports the below libraries.

The name or acronym can be used as library name. It follows the acronyn found in the iconify search engine

Name Acronym Location
ant-design ant-design Ant design
bootstrap bi Bootstrap icon
carbon carbon Carbon (IBM)
clarity clarity Clarity icon (essential)
codicon codicon Microsoft Code Icon
fad fad Fad (Font Audio Icons)
feather fe Feather
logos logos SvgPorn
material-design mdi Material design icon
octicon octicon Github Octicons
twemoji twemoji Twitter Emoji

The default library is material-design but you can change this configuration.

Other library

You can also download an icon from your preferred icon library and use it directly.

How to use an other icon library such as Google Icon.

Icon Vs Svg

An icon is just a svg that is seen as a character.

ComboStrap sets the following properties on a icon by default:

  • width and height have the same value (default to 24px)
  • color: currentColor by default
  • not responsive (no preserveAspectRatio and no max length CSS properties)
  • no alignment (ie no left, center or right)

As an icon is just a svg, you can also use the svg syntax directly against a custom svg to embed it as an icon.




Material Design Icon

Example with the arrow-down-circle

<icon name="arrow-down-circle" color="danger" width="96px" height="96px" />


Example with the arrow-down-circle-fill

<icon name="bootstrap:arrow-down-circle-fill" color="blue" width="48px" height="48px" />


Example with a box icon

<icon name="fe:box" color="blue" width="48px" height="48px" />

Other library such as google icon

You can also easily embedded icons from other icon banks.

You just need to follow this steps:

  • go to your icon repository or the iconify search engine
  • download your icon
  • upload it to your media library (preferably under the directory combostrap:icons)
  • use it:
    • with the svg syntax with a value of icon for the type attribute
    • or with the icon syntax (if saved under the directory combostrap:icons)

Example with Google icon and the favorite icon saved in the media library in the namespace combostrap:icons:google


  • with the icon syntax (if you saved it under the directory combostrap:icons)
<icon name="google:favorite_black_24dp" width="36" color="purple"/>



In the color attribute, you can set a color value.

ComboStrap detects automatically if the icon is a solid or outline one and sets the color accordingly.

Example with the bootstrap alarm clock

The outline icon

<icon name="bs:alarm" color="pink" />

Versus the solid (iefill) icon

<icon name="bs:alarm-fill" color="pink" />

Sizing: Width and Height

The width and height attributes have the same value and takes the default value of 24px but you can overwrite it.

<icon name="logo.svg" width="96px" />

Styling and Native Attribute

The icon component supports also :


<icon name="bs:alarm-fill" color="pink" onHover="grow" width="36"/>


Icons namespace

When the icon does not exist, the component downloads the icons in the namespace set in the icons_namespace configuration.

The default value is :combostrap:icons

On the server, the namespace is a location from the media directory: DOKUWIKI_HOME/data/media/

Default Library

You can change the default library with the defaultIconLibrary configuration.

At installation time, the default library is material design.



This component uses the DOM module. This module is enabled by default on all hosting platform. It should be then no problem for most of your installation.

Why downloading the image and not using a library

We are not using a library and have decided to download the svg file for the following reasons:

  • the icon can then be used as illustrative page image
  • even if the library does not exist anymore, your page will still show the icon.
Powered by ComboStrap