Theme ๐Ÿ’Ž Built for Sidekick โœ๏ธ Sidekick drafts it โ€” you apply it
shopify sidekick theme product-swatches

Swatchified Collection Section

Display a collection grid with interactive color swatches that swap the product image on hover.

Sidekick writes it โ€” you put it live

Sidekick produces the content or code for this, but doesn't apply it to your store itself. You'll paste or publish the result yourself โ€” the prompt tells Sidekick to explain exactly where it goes.

๐Ÿ“‹ Prompt
Run in Sidekick
Generate the Liquid, JavaScript, and CSS for a swatchified collection section that I can paste into my theme as a custom section โ€” one that displays products from [COLLECTION_NAME] in a grid where each product card shows color variant swatches below the image. When a customer hovers over or clicks a swatch, the product card image should swap to show that variantโ€™s featured image. The swatches should be small circles filled with the actual color (using variant option values mapped to hex colors via a [COLOR_MAP_METAFIELD] metafield or a hardcoded color map). Show a maximum of [MAX_SWATCHES] swatches per card, with a +N indicator if more exist. Each card should also include: product title, price (updating to the selected variant price), and an Add to Cart button. The grid should show [COLUMNS] columns on desktop. Add schema settings for the collection picker, columns, and max swatches. Generate the Liquid section, JavaScript for image/price swapping, and CSS.

Where to paste this: In Shopify admin, go to Online Store > Themes > Edit code, create a new file at sections/swatchified-collection.liquid, and paste in the generated Liquid, JavaScript, and CSS. If youโ€™re using a color-map metafield, set that up first under Settings > Custom data > Products. Then add the section to a page via the theme customizer (Online Store > Themes > Customize > Add Section).

How to Use

  1. Copy the prompt above
  2. Open Shopify Sidekick in your Shopify admin
  3. Paste the prompt and replace the bracketed placeholders with your details
  4. Review Sidekick's response and apply the suggestions