Icons

Add icons into your content with its dedicated shortcode

ITADS

Table of content
  1. List
  2. How to use
  3. Inherited icon size
  4. Fixed icon sizes
  5. Custom icon
  6. Custom color

List

Here is the list of included SVG icons, you can use your own icons.

How to use

Use the dedicated shortcode {% icon '<ICON_NAME>', <ICON_SIZE> %}. Icon size is based on CSS font-size property.

Inherited icon size

Default icon size is 1em . The icon size is inherited, you can set your own size through the parent element font-size property, for example:

<div style="font-size: 100px">
    {% icon 'rocket' %}
</div>

Fixed icon sizes

Inherited icon size {% icon 'rocket' %}

Specified icon sizes:

{% icon 'rocket', 1 %}
{% icon 'rocket', 2 %}
{% icon 'rocket', 3 %}
{% icon 'rocket', 4 %}
{% icon 'rocket', 5 %}
{% icon 'rocket', 6 %}
{% icon 'rocket', 7 %}
{% icon 'rocket', 8 %}
{% icon 'rocket', 9 %}
{% icon 'rocket', 10 %}

Custom icon

Use you own icon! Widget supports both SVG and raster images with transparency. You can set a path or an URL as name for the icon.

Local SVG {% icon '/assets/logo-11ty.svg', 10 %}
Remote SVG {% icon 'https://cdn.jsdelivr.net/gh/ita-design-system/ita-medias@main/logo-11ty.svg', 10 %}
Local PNG {% icon '/assets/logo-11ty.png', 10 %}
Remote PNG {% icon 'https://cdn.jsdelivr.net/gh/ita-design-system/ita-medias@main/logo-11ty.png', 10 %}
Local AVIF {% icon '/assets/logo-11ty.avif', 10 %}
Remote AVIF {% icon 'https://cdn.jsdelivr.net/gh/ita-design-system/ita-medias@main/logo-11ty.avif', 10 %}

Custom color

Just like icon size is related to CSS font-size property, icon color is inherited and can be customized as follows:

<div style="color: fuchsia">
    {% icon '/assets/logo-11ty.avif', 10 %}
</div>