Tutorials

How to Add Product Variation Swatches in WooCommerce

Learn how to replace clunky WooCommerce dropdown menus with clean color, image, and button variation swatches without writing a single line of code.

Blogitems
By Blogitems Team
··8 min read
On this page (13)
How to Add Product Variation Swatches in WooCommerce
đź’ˇ

Key Takeaways (TL;DR)

By default, WooCommerce forces shoppers to select product colors and sizes using plain HTML dropdowns. Installing a dedicated swatches plugin like Swatchly replaces these friction-heavy menus with visual color circles, image thumbnails, and clickable button pills that boost mobile sales.

If you sell clothing, footwear, accessories, or customizable physical goods on WooCommerce, your product page presentation directly dictates your sales conversion rate.

Yet by default, WooCommerce treats your visual merchandise like an office spreadsheet. When a customer wants to choose between Navy Blue, Charcoal, and Olive Green, they are forced to click an uninspired dropdown select menu. On mobile devices, this opens an awkward native OS picker wheel that hides the product image, forcing shoppers to guess what each color actually looks like.

Even worse, standard dropdowns force customers into a frustrating game of trial and error: they pick an option, wait for the page to update, only to discover that the size-and-color combination is completely out of stock.

The solution is upgrading from dropdowns to Product Variation Swatches. With swatches, your color options appear as visual color circles, your patterns show up as miniature fabric thumbnails, and your sizes appear as sleek clickable button pills.

In this step-by-step guide, you will learn how to add beautiful, high-converting product variation swatches to your WooCommerce store in under 10 minutes—completely free and without touching a single line of code.


What You Need Before Getting Started

To follow this tutorial, you only need two things active on your WordPress installation:

  1. WooCommerce (installed and configured with at least one Variable Product).
  2. Swatchly (a lightweight, free variation swatches plugin by HasThemes available on WordPress.org).

While there are several swatches plugins in the WordPress ecosystem, we use Swatchly for this walkthrough because its free tier includes color, image, and label swatches out of the box, with zero impact on frontend loading speed.


Step 1: Install and Activate the Swatchly Plugin

First, add the swatches plugin to your WordPress site:

  1. Log in to your WordPress administrator dashboard.
  2. Navigate to Plugins $\rightarrow$ Add New Plugin.
  3. In the top-right search bar, type Swatchly.
  4. Locate Swatchly – WooCommerce Product Variation Swatches by HasThemes.
  5. Click Install Now, and once the installation finishes, click Activate.

Upon activation, Swatchly will automatically convert any existing global attributes on your site into clean, clickable swatches with default styling.


Step 2: Configure Your Global Product Attributes

For swatches to display properly across all products, your variation options (such as Color or Size) should be created as Global Attributes in WooCommerce rather than one-off custom attributes.

  1. In your dashboard, go to Products $\rightarrow$ Attributes.
  2. If you already have attributes like “Color” or “Size” listed, click Edit on that attribute.
  3. If creating a new one, enter a name (e.g., Color) and look at the new Type dropdown added by Swatchly:
    • Color: Select this if you want circles or squares showing solid colors.
    • Image: Select this for patterns, textures, or miniature product thumbnails.
    • Label / Button: Select this for text-based attributes like sizes (S, M, L, XL) or shoe dimensions.
  4. Set your preferred Swatch Shape (Circle, Rounded, or Square).
  5. Click Add Attribute (or Update).

Step 3: Assign Colors, Images, and Labels to Attribute Terms

Now that WooCommerce knows your attribute type, you need to tell it what each individual option looks like:

  1. On the Products $\rightarrow$ Attributes page, click Configure terms next to your Color attribute.
  2. You will see your existing color terms (e.g., Black, Blue, Red). Click Edit on a specific term (e.g., Navy Blue).
  3. Scroll down to the Swatchly Color field:
    • Click the color picker box and select your exact hex shade (e.g., #000080 for Navy Blue).
    • Optional Dual Color: If you sell two-tone products (like a black jacket with yellow lining), Swatchly allows you to pick two colors for a split diagonal swatch.
  4. Click Update.
  5. Repeat this process for your remaining colors.

Quick Tip for Image Swatches: If you are configuring a pattern or fabric texture (like Denim or Leather), select Image as the attribute type and upload a small 100x100px square photo of the fabric in the term settings.


Step 4: Apply the Attributes to Your Variable Product

Next, link these visual terms to an actual product in your store:

  1. Go to Products $\rightarrow$ All Products and click Edit on your variable product.
  2. Scroll down to the Product Data box and confirm the dropdown is set to Variable product.
  3. Click the Attributes tab on the left:
    • Select your global attribute (e.g., Color) from the dropdown and click Add.
    • In the Value(s) field, select the terms you created in Step 3 (e.g., Black, Navy Blue, Red).
    • Ensure both Visible on the product page and Used for variations checkboxes are checked.
    • Click Save attributes.
  4. Click the Variations tab on the left:
    • Click Generate variations (or add them manually).
    • Make sure each variation has a Price entered and In Stock checked.
    • Assign a unique product photo to each variation so that when a shopper clicks a blue swatch, the main gallery image updates automatically.
  5. Click Update to publish your product changes.

Step 5: Customize Tooltips and Out-of-Stock Styling

To deliver a polished user experience, configure how your swatches behave when users hover over them or when an item sells out:

  1. Navigate to Swatchly $\rightarrow$ Settings in your WordPress admin menu.
  2. Open the General Settings tab:
    • Enable Tooltips: Turn this on so that when a shopper hovers their mouse over a color circle, a clean tooltip appears showing the exact color name (e.g., “Midnight Charcoal”).
    • Out-of-Stock Behavior: Choose how unavailable combinations look. We recommend setting this to Cross-through or Blur with Cross. This immediately signals to the shopper that a size is unavailable before they waste a click.
    • Shop / Archive Pages: Enable the toggle to show swatches directly on your main Shop catalog and category pages. This allows customers to view available colors without clicking through to the individual product URL.
  3. Click Save Changes.

Now, visit your product page on your live site (and test it on your mobile phone). You will see your clunky select dropdown replaced with sleek, responsive color swatches and button pills that update your product photos in real time.


3 Best Practices for High-Converting Swatches

  1. Keep Swatch Sizes Finger-Friendly for Mobile:
    Over 60% of modern e-commerce traffic comes from smartphones. Ensure your swatches are set to at least 32px by 32px in your settings. If buttons are too tiny, mobile shoppers will struggle with tap accuracy and bounce off your page.

  2. Always Pair Swatches with Variation Gallery Images:
    A color swatch is only half the battle. When a customer clicks on the “Olive Green” swatch, your main product photo must instantly switch to the olive green variation image. Failing to connect variation images creates hesitation and spikes return rates.

  3. Limit Swatch Choices to Avoid Analysis Paralysis:
    Psychological studies on e-commerce conversion consistently show that offering too many choices reduces sales. If a product has 24 different colors, display your top 6 bestsellers on the shop archive page and use an “Expand More” toggle to keep your layout clean.


Frequently Asked Questions (FAQ)

Will variation swatches slow down my WooCommerce product pages?

No, provided you use a well-coded plugin like Swatchly. Swatchly operates on lightweight CSS and minimal vanilla JavaScript, adding less than 15KB of asset weight to your product pages. It does not load external frameworks or remote fonts.

Can I display variation swatches on my category and catalog pages?

Yes. In Swatchly’s settings, you can enable the “Show on Shop / Archive Pages” feature. This displays clickable color circles directly beneath the product card on your catalog page, allowing shoppers to preview colors without opening a new tab.

How do swatches handle out-of-stock items?

Instead of letting customers select an item only to see an “Out of Stock” error message, modern swatches plugins visually cross out or dim sold-out options. This saves your customers time and prevents checkout frustration.

What happens if I deactivate the swatches plugin later?

If you ever deactivate Swatchly, your products will not break. WooCommerce automatically reverts to displaying standard HTML dropdown select menus without any data loss.


Final Thoughts: A Simple Tweak with Massive Returns

Upgrading your WooCommerce store does not require redesigning your entire website or spending thousands of dollars on custom development.

Replacing default dropdowns with clean variation swatches takes less than 10 minutes, immediately gives your store a modern brand appearance, and eliminates the mobile friction that silently costs you sales every day.

Tags:#WooCommerce#eCommerce#Tutorials#WordPress
Blogitems

Blogitems Team

Engineering high-speed decoupled architectures, edge caching, and headless WordPress platforms delivering sub-second global speeds. Focused on making modern cloud-native web infrastructure fast and intuitive.

Blogitems Journal

Build Faster, Scale Smarter

Skip the trial-and-error, cancel the useless $29/month subscriptions, and run a blazing-fast site using tools that actually pay for themselves.