Documentation
Feedback
Guides
Storefront Development

Storefront Development
Store Framework
Styling
Customizing your store's icons

Introduction

VTEX Styleguide has a default iconography that is used in all VTEX IO store's components. Their implementation is imported via the Store Icons app.

Although these can satisfy your store’s needs, you may want to override and customize default icons according to your store's identity. If so, simply follow the steps below.

Step by step

  1. In your store-theme code, create a new folder named iconpacks/ within styles/.
  2. Inside iconpacks/, create the file iconpack.svg.
  3. Copy the content from VTEX'S default iconpack.svg and paste it in the iconpack.svg file.

The maximum size allowed for icons is 20x20.

A workspace can only have a single app installed that contains the iconpack customization.

This is how your styles/ folder structure should look like after you've accomplished that:

{"base64":"  ","img":{"width":980,"height":1068,"type":"png","mime":"image/png","wUnits":"px","hUnits":"px","length":150750,"url":"https://cdn.jsdelivr.net/gh/vtexdocs/dev-portal-content@main/images/vtex-io-documentation-customizing-your-stores-icons-0.png"}}

The iconpack.svg file will implement SVG frament identifiers, allowing you to simply change the part of the code that declares the icon's g tag instead of customize itself.

For instance, let's customize the cart icon (hpa-cart) changing only its g content:

{"base64":"  ","img":{"width":880,"height":251,"type":"png","mime":"image/png","wUnits":"px","hUnits":"px","length":68890,"url":"https://cdn.jsdelivr.net/gh/vtexdocs/dev-portal-content@main/images/vtex-io-documentation-customizing-your-stores-icons-1.png"}}

After linking your app, you should see the changes in the browser:

{"base64":"  ","img":{"width":164,"height":90,"type":"png","mime":"image/png","wUnits":"px","hUnits":"px","length":4130,"url":"https://cdn.jsdelivr.net/gh/vtexdocs/dev-portal-content@main/images/vtex-io-documentation-customizing-your-stores-icons-2.png"}}

Check out each icon's ID by accessing the Icon Pack list.

If you've linked your code and haven't seen your changes, it may be because your Styles builder is not up-to-date with this functionality. Make sure your store has it installed at version 1.8.1 or higher.

Contributors
2
Photo of the contributor
Photo of the contributor
+ 2 contributors
Was this helpful?
Yes
No
Suggest edits (Github)
Contributors
2
Photo of the contributor
Photo of the contributor
+ 2 contributors
On this page