Free Plugin

Sayan Variation Swatches
for WooCommerce

Replace boring dropdowns with beautiful color, image, label, and radio swatches. Boost conversions with a stunning product selection experience — zero configuration needed.

v1.0.0 WP 7.0 Tested WC 10.8 Tested PHP 7.4+ HPOS Ready GPL-2.0

Overview & Features

Sayan Variation Swatches for WooCommerce is a lightweight WooCommerce plugin that replaces the default variation dropdown selects with visually rich swatches — color pickers, image tiles, label buttons, and radio selectors.

4 Swatch Types

Color, Image, Label/Button, and Radio — each with full customization.

3 Swatch Shapes

Square, Rounded, and Circle — set globally or override per product.

Archive Page Swatches

Show compact swatches on shop, category, and archive pages.

Variation Image Auto-Swap

Gallery image updates instantly on swatch click — no AJAX, zero lag.

Dual / Split Colors

Show two colors in a single swatch with a diagonal split gradient.

Out-of-Stock Handling

Blur with cross, blur only, or hide unavailable swatches automatically.

Live Swatch Preview

Below is a preview of how each swatch type renders on your product page:

Color Swatches

Selected: Ocean Blue

Label / Button Swatches

XS
S
M
L
XL
2XL
Selected: M

Radio Swatches

S
M
L

System Requirements

ComponentMinimumRecommended
WordPress6.47.0+
WooCommerce7.010.8+
PHP7.48.3+
MySQL / MariaDB5.6 / 10.18.0+ / 10.4+
BrowserChrome 90+, Firefox 88+, Safari 14+, Edge 90+

Installation

Method 1 — WordPress Admin (Recommended)

1

Upload the plugin

Go to Plugins → Add New → Upload Plugin, choose the sayan-variation-swatches.zip file, and click Install Now.

2

Activate

Click Activate Plugin after installation completes.

3

Configure

Go to Sayan Variation Swatches in the left WordPress admin menu to adjust global settings.

4

Set up attributes

Go to Products → Attributes, click any attribute name, then edit individual terms to assign swatch types and colors.

Method 2 — Manual FTP

# Unzip and upload to your plugins directory
unzip sayan-variation-swatches.zip
# Upload the folder via FTP to:
/wp-content/plugins/sayan-variation-swatches/

Then activate from Plugins → Installed Plugins.

WooCommerce must be installed and activated before activating this plugin. If WooCommerce is missing, an admin notice will appear.

Swatch Types

The plugin supports 4 swatch types plus the default dropdown. Set the type globally per attribute term, or override it per product.

TypeBest ForData Required
ColorColor variants, fabric shades, paint optionsHex color (+ optional second color for dual)
ImagePatterns, textures, material previewsUpload an image per term
LabelSizes (S/M/L/XL), styles, materials as textNone — uses term name
RadioYes/No options, simple choicesNone — uses term name
SelectKeep as default WooCommerce dropdownNone

Admin Screenshot — Attribute Term Edit

WordPress Admin — Products → Attributes → pa_color → Edit Term
≡ WordPress ⬤ Products All Products Add New Attributes ◈ WooCommerce Edit Color: Ocean Blue Edit Term: Ocean Blue Name Ocean Blue Slug ocean-blue Swatch Type Color ▾ Select how this attribute will be displayed as a swatch. Swatch Color #2563eb Choose the swatch color. Second Color (Dual) No color Optional: second color for a split/dual swatch. Update
Products → Attributes → Edit any attribute → Edit a term — set Swatch Type, Color, and optional Second Color

Dual / Split Color

When you fill in both the Swatch Color and Second Color fields, the swatch renders as a diagonal split — useful for multicolor or two-tone fabric options.

Dual-color swatches using diagonal gradient

Swatch Shapes

Three shape options are available globally from Settings → General → Swatch Shape.

Square

Sharp 90° corners. Clean and modern.

Rounded

Soft corners. Default and most versatile.

Circle

Fully round. Ideal for color swatches.

Archive / Shop Page Swatches

Enable compact swatches on your shop, category, and archive pages so customers can preview color options without clicking into each product.

Enable this from Settings → Shop / Archive → Show Swatches on Archive. You can also set a smaller swatch size specifically for archive pages.

Conversion tip: Archive swatches reduce the number of clicks to product selection, especially on fashion and apparel stores. Studies show 10–25% conversion lift when variation previews are shown on listing pages.

Variation Image Auto-Swap

When a customer clicks a swatch, the main product gallery image automatically updates to show the matching variation image — with no page reload, no AJAX request, and no configuration required.

How it works

1

Set variation images in WooCommerce

In the product editor, go to Product data → Variations. For each variation, upload a dedicated image using the variation image picker (the small camera icon).

2

Plugin builds image map at page load

When the product page loads, the plugin reads all variation images and embeds a slug → image data map directly into the swatch HTML. No AJAX calls are ever made.

3

Swatch click triggers instant swap

Clicking a swatch updates the gallery <img> src, srcset, sizes, and alt — as well as the PhotoSwipe / lightbox href. The transition is immediate.

4

Deselect restores original image

Clicking a selected swatch again (or pressing the WooCommerce "Clear" button) restores the product's original main gallery image.

If a variation does not have a dedicated image set (i.e. it uses the parent product image), no swap occurs for that swatch. Only variations with unique images trigger the gallery update.

Out-of-Stock Styles

Configure from Settings → General → Out-of-Stock Style. Three options are available:

StyleAppearanceBest For
Blur with Cross Default Swatch is faded (38% opacity) with a diagonal line across it Most stores — clearly communicates unavailability
Blur only Swatch is faded without the cross line Cleaner look when the cross feels too aggressive
Hide Out-of-stock swatches are completely removed Stores where showing unavailable options causes confusion
Available
Blur+Cross
Blur only

Tooltip

When enabled, hovering over any swatch shows a small label above it with the attribute term name (e.g. "Ocean Blue", "Size M").

Customize tooltip colors and font size from Settings → Design & Style → Colors.

Tooltip BG Color

Background color of the tooltip bubble. Default: #333333

Tooltip Text Color

Text color inside the tooltip. Default: #ffffff

Tooltip Font Size

Font size in pixels (10–24px). Default: 13px

Enable/Disable

Toggle from Settings → General → Enable Tooltip.

Setting Up Attribute Swatches

Important: Swatch types are set at the term level (individual attribute values), not at the attribute level. Each color/size option gets its own type and data.

Step-by-Step: Setting up Color Swatches

1

Go to Products → Attributes

Find your Color attribute (e.g. pa_color) in the list.

2

Click the attribute name

This opens the term list for that attribute — you'll see all color options (Red, Blue, Green, etc.).

3

Edit each term

Click Edit next to a term (e.g. "Ocean Blue"). You'll see the plugin's new fields at the bottom of the edit form.

4

Set Swatch Type to "Color"

The Swatch Color field will appear. Click it to open the color picker and choose the color.

5

Optionally add a Second Color

Fill in the Second Color field to create a dual/split swatch.

6

Click Update

Repeat for each term. Your product pages will now show color swatches instead of the dropdown.

Step-by-Step: Setting up Image Swatches

1

Edit the attribute term

Follow steps 1–3 above for your texture or pattern attribute.

2

Set Swatch Type to "Image"

The Swatch Image uploader will appear.

3

Upload or select an image

Click Upload / Select Image to open the WordPress Media Library. Choose or upload your image. Recommended size: at least 80×80px.

4

Click Update

The image thumbnail will be shown in both the term list (Swatch column) and on the product page.

Settings — General

Access settings at Sayan Variation Swatches → General in the WordPress admin.

WordPress Admin — Sayan Variation Swatches → General
≡ WordPress ◈ Sayan Variation Swatches ⬤ Products ⬤ WooCommerce Sayan Variation Swatches for WooCommerce Sayan Variation Swatches for WooCommerce Beautiful product swatches for WooCommerce v1.0.0 SETTINGS ⚙ General 🎨 Design & Style ───────────── 🏪 Shop / Archive ⌨ Advanced Core Settings Enable Swatches Auto-convert Dropdowns Swatch Shape Square Round Circle Out-of-Stock Style Blur with Cross ▾ Show Selected Name Tooltip Enable Tooltip Save Settings
Sayan Variation Swatches → General — Core Settings and Tooltip configuration
SettingDefaultDescription
Enable SwatchesYesMaster toggle. Disabling reverts all product pages to default WooCommerce dropdowns.
Auto-convert DropdownsYesConverts any attribute that has no swatch type set to a label/button swatch automatically.
Swatch ShapeRoundedGlobal shape: Square, Rounded, or Circle. Can be overridden per variation.
Out-of-Stock StyleBlur with CrossHow unavailable swatches appear. Options: Blur with Cross, Blur only, Hide.
Show Selected NameYesShows the selected attribute value name next to the swatch group (e.g. "Color: Ocean Blue").
Enable TooltipYesShows attribute name on swatch hover.

Settings — Design & Style

SettingDefaultDescription
Width (px)36Swatch width on product pages (20–120px).
Height (px)36Swatch height on product pages (20–120px).
Border Color#ddddddDefault border color for unselected swatches.
Selected Border Color#333333Border color when a swatch is selected.
CheckmarkEnabled / #ffffffShow a white checkmark on the selected swatch. Toggle + color picker.
Tooltip BG Color#333333Tooltip background.
Tooltip Text Color#ffffffTooltip text color.
Tooltip Font Size13pxTooltip font size (10–24px).

Settings — Shop / Archive

SettingDefaultDescription
Show Swatches on ArchiveYesDisplay compact swatches on shop, category, and archive pages.
Archive Swatch Width28pxWidth of archive page swatches (16–80px).
Archive Swatch Height28pxHeight of archive page swatches (16–80px).

Custom CSS

Access at Sayan Variation Swatches → Advanced → Custom CSS. Enable the toggle and paste your CSS. All swatch elements use the .svsw-* class prefix.

Useful CSS Classes

ClassDescription
.svsw-swatches-wrapOuter wrapper for each attribute's swatch group
.svsw-swatchesFlex container holding all swatches
.svsw-swatchIndividual swatch element
.svsw-type-colorColor swatch type
.svsw-type-imageImage swatch type
.svsw-type-labelLabel/button swatch type
.svsw-type-radioRadio swatch type
.svsw-swatch.selectedCurrently selected swatch
.svsw-swatch.svsw-unavailableOut-of-stock swatch
.svsw-tooltipTooltip bubble
.svsw-selected-nameSpan showing selected attribute name
.svsw-archive-swatchesArchive page swatch container
.svsw-shape-squareApplied when shape is square
.svsw-shape-roundedApplied when shape is rounded
.svsw-shape-circleApplied when shape is circle

CSS Custom Properties

The plugin injects these CSS variables dynamically based on your settings. You can override them in your custom CSS:

:root {
  --svsw-width: 36px;               /* Product page swatch width */
  --svsw-height: 36px;              /* Product page swatch height */
  --svsw-archive-width: 28px;       /* Archive swatch width */
  --svsw-archive-height: 28px;      /* Archive swatch height */
  --svsw-border-color: #dddddd;     /* Default border */
  --svsw-selected-border-color: #333333; /* Selected border */
  --svsw-checkmark-color: #ffffff;  /* Checkmark color */
  --svsw-tooltip-bg: #333333;       /* Tooltip background */
  --svsw-tooltip-color: #ffffff;    /* Tooltip text */
  --svsw-tooltip-font-size: 13px;   /* Tooltip font size */
}

Example: Make label swatches pill-shaped

.svsw-type-label .svsw-swatch {
  border-radius: 50px !important;
  padding: 0 16px;
  min-width: auto;
}

Example: Larger color swatches only

.svsw-type-color .svsw-swatch {
  width: 48px !important;
  height: 48px !important;
}

Example: Custom selected state highlight

.svsw-swatch.selected {
  box-shadow: 0 0 0 3px #ff6b35 !important;
}

Keyboard Navigation & Accessibility

All swatches are fully keyboard-navigable and screen-reader friendly. They use role="radio", aria-checked, aria-label, and tabindex="0".

KeyAction
TabMove focus to the swatch group
→ / ↓Move to the next swatch
← / ↑Move to the previous swatch
Enter / SpaceSelect the focused swatch
EscapeDeselect the current swatch

Compatibility

✅ WordPress 7.0

Tested with WP 7.0 "Armstrong". Plugin uses taxonomy term screens only — not affected by the DataViews admin redesign.

✅ WooCommerce HPOS

High-Performance Order Storage compatibility explicitly declared. No order data is touched by this plugin.

✅ WC Blocks

Cart & Checkout Blocks compatibility declared. Swatches operate on the product page and do not touch the block cart/checkout.

✅ Variable Products

Full support for variable products. Works with all standard WooCommerce variation selectors and the wc-add-to-cart-variation script.

✅ Popular Themes

Storefront, Astra, OceanWP, Flatsome, Divi, GeneratePress, Kadence — all tested and compatible.

✅ WPML / Polylang

Translation-ready. All strings use the sayan-variation-swatches text domain. A .pot file is included.

Frequently Asked Questions

My swatches are not showing. What should I check?

Ensure: (1) Enable Swatches is toggled ON in Settings → General. (2) Each attribute term has a Swatch Type set — go to Products → Attributes → edit any attribute term. (3) WooCommerce is active and up to date.

Can I set different swatch types for different products?

Yes. In the product editor, go to the Attributes tab. Per-product overrides are stored separately and take precedence over the global term meta.

The variation image is not swapping when I click a swatch.

Ensure the variation has a dedicated image set in the product editor (Variations tab → each variation row → the small camera icon). If a variation uses the parent product image, no swap occurs. Only variations with unique images trigger the swap.

My theme has a custom gallery. Will image swap still work?

The plugin updates the standard WooCommerce gallery img element, the wrapping a href (for lightboxes), and fires the woocommerce_gallery_reset_slide_position event. Most themes built on WooCommerce standards will work. If your theme uses a completely custom gallery, you may need a small CSS/JS integration.

How do I remove all plugin data when uninstalling?

Deleting the plugin (not just deactivating) triggers the uninstall.php file which removes all plugin options, term meta, and post meta from the database automatically.

Is there a Pro version?

Pro features are planned and will include: Quick View popup swatch support, Layered navigation filter swatches, Shareable variation URLs, Stock left badge ("Only 3 left!"), and more. Visit WordPress.org Profile for updates.

Can I use custom CSS to style swatches differently per attribute?

Yes. Use the attribute name in the selector via the data-attribute attribute on the wrapper:

/* Style only the color attribute swatches */
.svsw-swatches-wrap[data-attribute="pa_color"] .svsw-swatch {
  border-radius: 50%;
}

/* Style only the size attribute swatches */
.svsw-swatches-wrap[data-attribute="pa_size"] .svsw-swatch {
  min-width: 48px;
  font-size: 13px;
}
Still having issues? Visit WordPress.org support forum or open a ticket on the WordPress.org support forum for this plugin.

Sayan Variation Swatches for WooCommerce v1.0.0  ·  GPL-2.0  ·  WordPress.org