
SwatchKit replaces WooCommerce’s variable-product attribute dropdowns with color, image and size swatches.
There are already several good swatch plugins. Here is what is actually different about this one:
woocommerce_ajax_variation_threshold (30 by default), which is why out-of-stock and impossible combinations stop graying out on large catalogs. SwatchKit precomputes a compact availability index at save time instead — about 2.8KB gzipped for a 1,200-variation product — so swatch state is right at 1 variation and at 5,000, with no AJAX and no threshold to raise. This is free, and unlimited.wc-visual attribute type, mirroring the same values into its own keys so nothing breaks if you turn the feature off. Your swatch data is not trapped in one vendor’s proprietary meta.Several things other plugins charge for are free here, deliberately:
Swatches are real <button> elements in a role="radiogroup", with a roving tabindex, arrow-key and Home/End navigation, a focus ring that survives theme resets, and out-of-stock state conveyed in text rather than colour alone. The selected-state checkmark picks black or white automatically from the swatch’s computed relative luminance, so it stays visible on white and on black. prefers-reduced-motion disables every transition.
woocommerce_dropdown_variation_attribute_options_html, which is the single biggest source of theme conflicts avoided structurally rather than patched.<select> stays in the DOM and remains the source of truth for form submission. SwatchKit writes to it and dispatches a native change event, so WooCommerce’s own handlers run normally — which is why quick view, bundle and composite plugins work without vendor-specific hacks..swk-swatches. Restyle by redefining variables; there are no !important declarations to fight.swatchkit_swatch_html, swatchkit_swatch_classes, swatchkit_attribute_type, swatchkit_should_render, swatchkit_term_color, swatchkit_term_image_id, swatchkit_index_payload, swatchkit_settings, swatchkit_default_settings, swatchkit_before_swatches, swatchkit_after_swatches, swatchkit_index_rebuilt.add_theme_support( 'swatchkit', array( 'stylesheet' => false ) ) to ship your own styles.window.SwatchKit.refresh(), .on( event, callback ) and .version. Dispatch swatchkit:refresh on document after injecting markup of your own.assets/, and npm install && npm run build rebuilds build/.