Product variants
Use Align’s Variant selector block to let customers choose product options such as size, color, or sleeve length. Add the block to the Product information section on a product template or to a Featured product section on another template.
For product and variant setup in Shopify, see Shopify documentation on adding variants
Products with variant options need a Variant selector block for the add-to-cart action to work. The block does not display for products with no variant options.
Variant selector styles
Section titled “Variant selector styles”Choose how standard variant options appear in the selected Align template. Each Variant selector block has its own settings, so you can tailor the experience for different products or collections.
Dropdowns and pills
Section titled “Dropdowns and pills”Use the Variant selector style setting to choose one of the following layouts:
-
Dropdowns are the default layout and place options such as Size, Color, and Sleeves in select menus.
Dropdown style
-
Pills display options as selectable buttons.
Pills style
Swatches
Section titled “Swatches”Swatches are visual variant controls that can make options easier to compare than text-only dropdowns or buttons. They can provide visual feedback, support a more compact layout, and help customers identify colors, patterns, or product imagery quickly.
Align supports two swatch types:
- Color swatches display a color for an option value.
- Image swatches display the thumbnail assigned to a variant option.
Color swatches
Section titled “Color swatches”Color swatches automatically try to match an option value to a named CSS color. For example, an option value of Black uses #000000 by default. Add custom color definitions when option values need a specific color treatment.
Enable color swatches
Section titled “Enable color swatches”-
Open a product template in the Shopify theme editor.
-
In the Product information section, select the Variant selector block.
-
Enable color swatches.
[!NOTE] Color swatches override the selected Variant selector style, so the affected option no longer uses dropdown or pill controls.
-
Enter the variant option name or names in Color swatch Option names.
- Use the option name, such as
Color, rather than its values, such asBlack, Brown, Blue. - You can enter multiple option names separated by commas.
- Translated option names also work. For example, stores using the Shopify Translate & Adapt app can use
Color,Couleur, orSpalva.
- Use the option name, such as
-
Preview the swatches. By default, each swatch uses its option value as a color name. Refer to CSS named colors for available named colors.
-
Add custom color values when needed.
- Open Theme settings in the theme editor.
- Open Colors and find Custom color swatches.
- Enter comma-separated option-value and HEX-color pairs, for example:
Black: #000, Red: #ff0000.
For category-metafield color setup, see Shopify documentation on adding color swatches using category metafields
If you use a non-color option such as Material as a color swatch, define each value in Custom color swatches. Without a matching definition, the swatches appear empty.
Image swatches
Section titled “Image swatches”Image swatches display the thumbnail assigned to each variant option. An option without an associated image appears empty. When both color and image swatches apply to the same option, image swatches take priority.
Enable image swatches
Section titled “Enable image swatches”-
Open a product template in the Shopify theme editor.
-
In the Product information section, select the Variant selector block.
-
Enable image swatches.
[!NOTE] Image swatches override the selected Variant selector style for the affected option.
-
Enter the variant option name or names in Image swatch Option names.
Image swatch behavior
Section titled “Image swatch behavior”- Color and image swatches can be combined. A product can use different swatch types for different option groups.
- Each variant supports one image swatch.
- Variant combinations use their specific image. For example, a variant with Small and Black options uses the image assigned to that exact combination.
- Repeated images display once. If multiple option groups would use the same image, only the option listed first in the setting displays an image swatch. Later option groups use the default interface to avoid showing the same image repeatedly.
Swatch style settings
Section titled “Swatch style settings”Both color and image swatches include display settings for adjusting their shape and layout.
Swatch style
Section titled “Swatch style”Choose a swatch style that suits the product imagery and available space:
- Default displays image swatches in their natural aspect ratio. This option is available only for image swatches.
- Circle
- Landscape
- Portrait
- Square
- Widescreen
Column count
Section titled “Column count”Use separate desktop and mobile column settings to control swatch width in a responsive layout. Higher column counts create narrower swatches, while lower counts create wider swatches.
- Choose between one and eight columns.
- Check both desktop and mobile views, then adjust each setting for a comfortable tap target and readable layout.
- The column count controls the width of color and image swatches and automatically uses an appropriate image size.
Usage notes
Section titled “Usage notes”- Keep a selector block available. Products with variants need the Variant selector block for customers to add the selected variant to the cart.
- Use exact option names. Enter option labels such as
ColororMaterial, not individual option values, when enabling swatches. - Define non-standard colors. Add custom color definitions for values that are not recognized color names to prevent empty color swatches.
- Assign variant images carefully. Image swatches depend on images assigned to the relevant variant combinations.
- Check mobile layouts. Review mobile column counts and swatch sizes before publishing changes.