Skip to main content

Filter swatches

Overview​

Swatches replace plain radio buttons or checkboxes with visual chips—colors, images, or icons—ideal for WooCommerce attributes like Color or Material.

Swatches are configured on individual Filter Posts Item blocks in the block editor.

When to use swatches​

ScenarioSwatch type
WooCommerce color attributeColor swatches
Pattern / materialImage swatches
Brand logosImage swatches
Non-visual attributes (size)Text labels on swatches or standard radio buttons

Setup steps​

  1. Add a Filter Posts Item for a Product attribute or taxonomy.
  2. Set Control type to Radio or Checkbox (multi-select swatches).
  3. Open Design or Appearance settings for the filter item.
  4. Enable Swatches.
  5. Configure:
    • Swatch style — Color, image, or mixed
    • Size — Width and height
    • Show label — Term name above or below swatch
    • Alignment — Left, center, or right in the row
    • Active state — Border or background for selected swatch

Mapping colors and images​

For WooCommerce attributes:

  • Use Swatch source settings to pull from WooCommerce term meta or plugin-defined mappings when available.
  • For custom taxonomies, assign colors or images per term in the swatch configuration JSON / repeater in block settings.

After changing swatch mappings, save the page and test on the front end—cached pages may show old styles until cache clears.

Accessibility​

  • Enable Show label so screen reader users get term names, not only color.
  • Ensure sufficient contrast on active swatch borders.
  • Do not rely on color alone—combine with labels or tooltips for colorblind users.

Common issues​

IssueFix
Swatches show as empty circlesAssign color hex or image URL per term
Wrong imageCheck swatch source (Woo vs custom)
Layout breaks on mobileReduce swatch size; enable wrap in block layout

What's next​