Skip to content

How to Configure Text, Image, and Color Swatches in Magento 2

Swatches are an excellent approach to boosting the competitiveness of your customizable items. Rather than choosing from a drop-down menu, buyers may select what they want by clicking a swatch. Such swatches can be utilized on product and category pages, as well as in layered navigation.

Text, color, or image swatches have proven to be useful tools for making product offerings more appealing and informative.

Configurable Products 1

Configurable Products 1

Color Swatch

This feature allows you to see the possible color/texture/pattern possibilities. When an item is offered in multiple colors, it is easier for a consumer to select the appropriate product variation.

Text Swatch

This functionality is typically used to display sizes or other text-based options. This type of swatch is a button with a text label that functions exactly like a color swatch.

Image Swatch

The picture swatch functionality allows you to improve the visual components of your product offerings while also allowing buyers to see product variations in multiple colors/textures.

How to Configure Swatches in Magento 2

Go to Stores - Attributes - Product and select Color Attribute.

Swatches 1

Swatches 1

Swatches 2

Swatches 2

You may configure all of the available color swatch settings from here:

  1. Catalog Input Type for Store Owner – allows you to specify the type of input. You can choose between a Dropdown Menu, a Visual Swatch, and a Text Swatch.

  2. Update Product Preview Image — when this attribute is filtered, this action refreshes the product image on the catalog page.

  3. If possible, use a product image for the swatch — allows you to replace a swatch image with a product swatch or a base image.

When you're finished, navigate to the Manage Swatch (Values of Your Attribute) area.

Swatches 3

Swatches 3

To set the values for the selected attribute, click the Add Swatch button. If you've selected a color swatch, you can then add the colors you require and fill in the text descriptions. You may also use photos to substitute colors. Click the arrow next to the color box, then click the Upload a file button.

Please keep in mind that you can only define values for a text swatch as text. The most straightforward option is to utilize a dropdown type with text description values.

How to Assign Attributes to the Products

After you have completed all of the configuration processes, you must add attributes to the products. Go to Products - Catalog, pick the product to which you wish to add an attribute, and then select the Update Attributes option from the Actions drop-down menu. Change the attribute for the required one in the 'Color tab.'

Swatches 4

Swatches 4

Last update: 2022-06-10