How to add color swatches using Shopify category metafields in Webflow
Shopify's category metafields let you define standardised color attributes for your products and display them as color swatches. This guide walks you through setting up category metafields in Shopify and displaying the color swatches in your Webflow storefront using Shopyflow.
What are category metafields?
Category metafields map to specific product categories in Shopify's Standard Product Taxonomy. They help you add structured product attributes like color, size, neckline, and fabric to your products — making them more discoverable on your site, marketplaces, and search engines.
For example, if you add the product category Apparel & Accessories > Clothing > Clothing Tops > Shirts, you can unlock category metafields for clothing size, neckline, sleeve length type, and more — including color with built-in swatch support.
Category metafields have default entries that you can use as-is or customise. For example, you can rename black to graphite to match your branding, and the change applies everywhere that color is used.
① Add a product category in Shopify
- From your Shopify admin, go to Products.
- Click a product.
- In the Category section, select a category that includes the color attribute (e.g.,
Apparel & Accessories > Clothing > Clothing Tops > Shirts). - Click Save.
② Add and edit color entries
After adding a product category, you can add the color entries you need for your product's variant option values.
- From your Shopify admin, go to Products.
- Click the product with the category metafields you want to edit.
- In the Category metafields section, click the color metafield.
- To use a default entry, click it and edit the fields as needed.
- To add a custom entry, click Add new entry and fill out the fields.
- Click Save.
③ Connect color metafield to variant options
- From your Shopify admin, go to Products.
- Click the product you want to edit.
- In the Variants section, click + Add options like size or color.
- Select the color category metafield. The option values are automatically filled with the entries you added.
- Optional: Click Edit > Add new entry to add custom values.
- Click Save.
If you already have variant options, you can migrate them to category metafields by clicking the dynamic source icon on an existing option and connecting it to the category metafield.
④ Display color swatches in Webflow with Shopyflow
Once your color category metafield is connected to variant options in Shopify, Shopyflow detects the color entries and auto-syncs them to the Product Options collection in Webflow CMS during the next sync run. You can also re-import all your products in the Shopyflow Webflow App to speed up the syncing process.
From there, you can connect the hex code values to your swatch elements directly in the Webflow Designer.
Tips
- Category metafield entries are shared across products. Editing a color entry updates it everywhere that color is used.
- You can add custom color entries with hex values and images in Shopify to match your brand.
- Shopyflow syncs category metafield data from the Shopify Storefront API — no manual configuration needed in Webflow beyond connecting the hex codes to your swatch elements.