--- url: /reference/items/IconImg/examples.md --- # Examples ## Local icons :::code-group ```twig {% set icons = [ 'logo-studiometa', 'globe', ] %} {% set colors = [ 'rgb(62, 99, 221)', 'rgb(221, 99, 62)' ] %} {% for color in colors %}
{% for icon in icons %} {% include '@ui/Icon/IconImg.twig' with { name: icon, current_color: color, } %} {% endfor %}
{% endfor %} ``` ::: ## Material design icons [Material Design Icons](https://icones.js.org/collection/mdi) can be used directly. :::code-group ```twig {% set icons = [ 'mdi:globe', 'mdi:at', 'mdi:mail', 'mdi:phone', 'mdi:content-copy', 'mdi:link', 'mdi:chevron-left', 'mdi:chevron-up', 'mdi:chevron-right', 'mdi:chevron-down', ] %} {% set colors = [ 'rgb(62, 99, 221)', 'rgb(221, 99, 62)' ] %} {% for color in colors %}
{% for icon in icons %} {% include '@ui/Icon/IconImg.twig' with { name: icon, current_color: color, } %} {% endfor %}
{% endfor %} ``` ::: ## Unicons [Unicons](https://icones.js.org/collection/uil) can be used directly. :::code-group ```twig {% set icons = [ 'uil:globe', 'uil:at', 'uil:envelope', 'uil:phone', 'uil:copy', 'uil:link', 'uil:angle-left', 'uil:angle-up', 'uil:angle-right', 'uil:angle-down', ] %} {% set colors = [ 'rgb(62, 99, 221)', 'rgb(221, 99, 62)' ] %} {% for color in colors %}
{% for icon in icons %} {% include '@ui/Icon/IconImg.twig' with { name: icon, current_color: color, } %} {% endfor %}
{% endfor %} ``` :::