Swatches are a concept in Replo which allows you to associate colors, images, gradients, and more with product option values or variants.
Swatches are useful for product features where you want display options (for example, colors of clothing, flavors of drinksa) with branded colors or images that are distinct from what can be set in Shopify.
Creating and Updating Swatches
Swatches can be created or updated using the Option List or Variant List component.
To edit swatches:
- Find a Product component in Replo, or create one by dragging it in
- Drag in a Variant List component or an Option List component
- Under Config in the right bar, find Swatches
- Click on the Swatch you want to edit, or click the plus button to create a new one
When editing a swatch, you can select products from your Shopify store to associate colors, images, gradients, and more with each of those products' options or variants.
Swatches and Products
A Swatch can associate colors and images with either option values or variants. If you need to have a swatch of both option values and variants, you can create two different swatches with the same product.
To change the type of the Swatch that you're editing
- Find the swatch you want to edit
- Ensure that you have products selected by clicking the "Select Products" button in the swatch editor popup
- Find the dropdown in the upper-right of the swatch editor popup, which will say either "By Variant" or "By Option"
- Select the type you want - the swatch editor popup will update with all the option values or variants, depending on the swatch type.
Editing Swatch Values
Swatches associate values (colors, images, etc) with an option value or variant.
To edit the values of a Swatch:
- Find the watch you want to edit
- Click on the swatch to open the swatch editor popup
- Ensure you've selected products using the "Select Products" button - the swatch editor will automatically show all variants and option values for the products you've selected
- On the right of each variant or option value, select the button that says "no fields set"
- In the popup that opens, select a color, image, gradient, or image list
All edits to Swatches are automatically saved.
Multiple Swatch Values
Replo supports setting multiple values for a single variant or option. For example, one variant can have both an associated color and an associated image. To set multiple values, simply set both in the swatch editor popup.
Using Swatch Values
Swatch values are available via Dynamic Data. To add a swatch value as a color or image:
- Inside an Option List or Variant List component, select the component you want to add a color or image to
- Find the property you want to add a color or image to (for example, background color or background image)
- Select dynamic data, then find Swatches and select the swatch you want to take the value from
- Select Add Dynamic Data to confirm the swatch value selection