What are swatches?
Swatches are visual indicators that display the colors, patterns and materials in which a product is available to customers.
Instead of displaying color options as plain text, swatches provide a more intuitive and engaging way for customers to interact with the available choices. Use variant images, color category metafields, color hex codes or upload your own custom swatch images. Control the size and the shape of swatches using the theme settings.
How to set up swatches
Steps
- Open the Theme Editor, and click on Theme settings > Swatches.
- Set the swatch method using the Swatches to display to be Theme, Shopify or None.
- Set the Swatch size (Listed out style) and Swatch radius.
- Swatches will match the variant picker display style. Set the Variant style to be Drop down or Listed out in Theme settings > Products.
Shopify swatches
Shopify native swatches work using a color category metafield. When creating or editing a product it is possible to link a variant option to the color metafield. Shopify have a color category metafield guide which explains how to set this up. These swatches can be displayed on the product page, quick buy, featured product section, in filters and product cards.
Steps
- Open the Theme Editor, and click on Theme Settings > Swatches.
- Set the Swatches to display to be Shopify.
- If using images, set the Swatch image crop alignment.
Theme swatches - variant image method
Variant image swatches can be displayed on the product page, quick buy, featured product section and in product cards.
Steps
- Open the Theme Editor, and click on Theme Settings > Swatches.
- Set the Swatches to display to be Theme.
- Enter the Swatch option name (e.g. Color).
- Within the Swatch method setting, select Variant image.
- If using images, set the Swatch image crop alignment.
Tip
Theme swatches - color list method
Color list method swatches can be displayed on the product page, quick buy, featured product section and under the product images in the product grid. In addition, unlike the variant image swatches, they can also be used for filtering on the collection page or search page.
Steps
- Open the Theme Editor, and click on Theme Settings > Swatches.
- Set the Swatches to display to be Theme.
- Enter the Swatch option name (e.g. Color)
- Within the Swatch method setting, select Color list.
- Within the Swatch color list setting, enter the color followed by : then followed by the hex code which should start with a #. (Example Red:#ff0000 Green:#008000 Blue:#0000ff). Each color should be on a separate line. For multicolored striped swatches, enter multiple values per line. (Example Red & Blue:#ff0000#0000ff). The colon separates the color name from the hex codes.
Custom images as swatches
If custom swatch images are required, these can be uploaded and used with the Color list method. It's also possible to use a mixture of hex codes and custom images.
Steps
- Create a PNG image file for each color. Aim to match the size of the Icon size setting to prevent any stretching or image blurring. Maintaining consistent size and aspect ratio across all image files is recommended to prevent cropping.
- Name each file to match the handle of the variant color title, replacing spaces with a dash (-) and keeping the file name lowercase. For example, if the variant is named "Fire Engine Red" name the file "fire-engine-red.png". Remove any special characters, use only the Latin/Roman alphabet and standard characters (a-z) only. For instance, "waldgrün.png" should be renamed to "waldgrun.png."
- Open the Shopify admin and click on Content > Files.
- Select Upload files to upload your images.
- Open the Theme Editor, and click on Theme Settings > Swatches.
- Enter the Swatch option name (e.g. Color)
- Within the Swatch method setting, select Color list.
- Within the Swatch color list setting, enter the name of the followed by : followed by the file name. Each color should be on a separate line. (Example Red:red.png)
- Set the Swatch image crop alignment.
How to display swatches in the product grid
Swatches using both the color list method and the variant image method can be shown under the product image in the product grid.
Steps
- Open the Theme Editor, and click on Theme settings > Swatches
- Within the product grid settings, select Enable swatches.
- Set the Swatch size and Swatch radius to suit your product cards.
- Use the setting Maximum number of swatches displayed to control how many swatches are shown under the card. This can be useful to create a neat card layout. Additional swatches are displayed on hover or tap.
How to display swatches in filters
Shopify color category metafield swatches and theme Color list swatches can be shown in filters. Control the Swatch size and Swatch radius in the Collection filter section of the swatch theme settings.
In earlier theme versions, theme color list swatches were shown in filters by selecting the Enable swatches in collection/search filters setting. In Boost theme versions after 8.0.0 this setting has been removed and swatches are automatically shown when correctly configured. Filters can be managed in the Shopify Search and Discovery app.
FAQs
Can I use Shopify visual metafields and Shopify color category metafields ?
Versions of the Boost theme after 8.0.0 support Shopify color category metafields as swatches. Versions of the Boost theme after 6.2.0 support Shopify's visual filters.
Can I change the size and shape of the swatches shown?
Versions of the Boost theme after 8.0.0 include additional settings to control the size and shape of swatches.
Will swatches still work when the store language is changed?
Yes. Under swatch settings, you will want to add the translations of your variant title in other languages.
Steps
- Open the Theme Editor, and click on Theme Settings > Swatches.
- In the Color option name settings, add translations, separating each word with a comma.
- Check your translation app. Please note, Shopify's built-in translation app lacks an auto-translation feature, it is crucial to consistently confirm and auto-translate whenever modifications are made otherwise the swatches won't display.
Can I have theme swatches on more than one option on the product page?
Yes, you need to add that option title in the Swatch option name field separated by a comma. Be sure to add image files or codes for the additional colors in the Swatch color list.
Can't find what you're looking for?
Our support staff are here to answer your queries, so don't hesitate to write to us!
Contact us