Full list of Magento2 Base font icons and their usage

This post is just a summary repost of Magento2 icons with their variable names. First of all, it’s useful to me because I always end up trying them all until I find the icon I need. I hope it can be useful for someone else too.

In This Article:

List of basic icons

These are all the icons included in the Luma and Blank themes. If you just want to know how to use them, jump to the next paragraph

Image Less Variable Content
icon-wishlist-full.png @icon-wishlist-full ‘\e600’
icon-warning.png @icon-warning ‘\e602’
icon-update.png @icon-update ‘\e603’
icon-trash.png @icon-trash ‘\e604’
icon-star.png @icon-star ‘\e605’
icon-settings.png @icon-settings ‘\e606’
icon-update.png @icon-pointer-down ‘\e607’
icon-next.png @icon-next ‘\e608’
icon-update.png @icon-menu ‘\e609’
icon-location.png @icon-location ‘\e60a’
icon-list.png @icon-list ‘\e60b’
icon-info.png @icon-info ‘\e60c’
icon-grid.png @icon-grid ‘\e60d’
icon-comment-reflected.png @icon-comment-reflected ‘\e60e’
icon-collapse.png @icon-collapse ‘\e60f’
icon-checkmark.png @icon-checkmark ‘\e610’
icon-cart.png @icon-cart ‘\e611’
icon-calendar.png @icon-calendar ‘\e612’
icon-arrow-up.png @icon-arrow-up ‘\e613’
icon-arrow-down.png @icon-arrow-down ‘\e614’
icon-search.png @icon-search ‘\e615’
icon-remove.png @icon-remove ‘\e616’
icon-prev.png @icon-prev ‘\e617’
icon-pointer-up.png @icon-pointer-up ‘\e618’
icon-pointer-right.png @icon-pointer-right ‘\e619’
icon-pointer-left.png @icon-pointer-left ‘\e61a’
icon-flag.png @icon-flag ‘\e61b’
icon-expand.png @icon-expand ‘\e61c’
icon-envelope.png @icon-envelope ‘\e61d’
icon-compare-full.png @icon-compare-full ‘\e61e’
icon-compare-empty.png @icon-compare-empty ‘\e61f’
icon-comment.png @icon-comment ‘\e620’
icon-up.png @icon-up ‘\e621’
icon-down.png @icon-down ‘\e622’
icon-help.png @icon-help ‘\e623’
icon-arrow-right-thin.png @icon-arrow-right-thin ‘\e624’
icon-arrow-left-thin.png @icon-arrow-left-thin ‘\e625’
icon-arrow-down-thin.png @icon-arrow-down-thin ‘\e626’
icon-account.png @icon-account ‘\e627’
icon-gift-registry.png @icon-gift-registry ‘\e628’
icon-present.png @icon-present ‘\e629’

How to use icons in Magento2

The variables above can be used in the following mixin to include a base icon in your custom design.

   @_icon-font-content: @icon-star,
   @_icon-font-size: @icon-font__size,
   @_icon-font-line-height: @icon-font__line-height,
   @_icon-font-text-hide: @_icon-font-text-hide,
   @_icon-font-color: @icon-font__color,
   @_icon-font-color-hover: @icon-font__color-hover,
   @_icon-font-color-active: @icon-font__color-active,
   @_icon-font-margin: @icon-font__margin,
   @_icon-font-vertical-align: @icon-font__vertical-align,
   @_icon-font-position: @icon-font__position,
   @_icon-font-display: @icon-font__display

by applying the mixin to any dom element in a .less file, a pseudo-element will be applied to it (after or before depending on the @_icon-font-position parameter).

It’s not mandatory to use all the parameters, you can also include only those you need and the others will just have the default value.

Sometimes you will need to set a global value for all icons in your theme. In that case you don’t have to touch the mixin you can just set a global variable. For example if you want a custom font size for all the icons, you will just do:

@icon-font__size: 35px;

It’s also possible to use this same mixin with another icon font of your choice. Just add it as @_icon-font as a parameter:

  @_icon-font: @custom-icon-font
Irene Iaccio

Freelance web developer

Subscribe to the monthly digest!

I'll use your email only to send you the latest posts once a month.