Craftshift logo

Shopify swatch design: shapes, sizes, spacing, and accessibility

shopify swatch design guide

Good shopify swatch design is one of those things that looks invisible when it works and screams at you when it does not. Swatches are the smallest UI element on a product page, and they carry one of the heaviest jobs: letting the shopper pick a variant fast, with confidence, on any device, without second guessing.

Many Shopify themes come with swatches already enabled, but with very basic defaults. Small hit areas, no focus, poor color contrast for light colors, and no indicator when you have selected an item. As a result, half your users may not even know that your swatches are clickable.

This guide explores the swatch’s form, size, spacing, hover and focus states, mobile-friendly UX considerations, the use of color over image swatches, and accessibility guidelines that cannot be ignored. Use the free Swatch Preview tool to quickly preview swatch combinations and the color palette generator tool to build matching color palettes.

In this post

Swatch shapes

ShapeBest forWatch out for
CirclePure color swatches, apparel, accessoriesHard to read text labels inside
SquarePattern and fabric swatchesLooks dated on minimal themes
Rounded squareGeneral purpose, works everywhereBland if all you use
PillSize swatches with short labels (S, M, L, XL)Not for color only

Use the same shape for each attribute. Examples: Circles for color, pills for size, and rounded squares for material. Don’t mix and match shapes within one row (Three circles and a square looks broken). Test out options in the swatch preview tool.

Sizes and spacing

Fun fact nobody talks about: 44px target size applies only to click area, not actual width that is visible on theme. You can render a 32px circle and still be within WP Theme Rule limits. That’s why most themes like Dawn do it.

Hover, focus, selected states

Every color gets to be seen 4 different ways. Miss one and the experience breaks for someone.

The selected state is where most color pickers screw up. In ColorNail, the thin underline under the selected swatch is next to impossible to see on a light background. A solid 2px wide, highly visible ring would help here. A black ring on a white background, for example, is perfectly visible. A white ring on a dark background is just as good.

Mobile UX rules

We’ve found that the Mobile Swatch UX is a losing battle for many Shopify stores. The ideal behavior would be for the main product image to update as you selected different swatches, but currently that isn’t possible. Fix this behavior with the Rubik Variant Images app, which will then filter your product gallery to the currently selected variant.

Color vs image swatches

Flat colors (solid colors) are best represented as color swatches. Patterns, textures and prints are best represented as image swatches. A flat red circle is a fine representation of “Red”. A red circle for “Red Tartan” would be a lie to the shopper, and would hurt the trust that you have worked so hard to establish.

Some themes force you to choose between stores, but you should be able to mix and match if allowed. Build the swatch values into the color palette generator, then add them to the preview swatches for any wovens that have pattern variants.

For stores that need swatches across separate products on collection pages *AND* where each product has only one color (i.e. not a multiple of colors), you’d also need Rubik Combined Listings to connect the individual products and generate the combined swatches on the product pages as well.

Accessibility checklist

The European Accessibility Act has come into force and many Shopify stores are unknowingly inaccessible. What does the EAA require and how can you make sure your Shopify store is compliant? Check out our WCAG swatch guide and our EAA guide to find out.

Design and preview

Wire swatches straight into your production workflow. Iterate on your color palette within the Stencil design tool. Test and confirm keyboard and touch interactions. Here’s how to get started. First, take a look at our Demo Store. Then, check out our Tutorial Video or Getting Started Guide.

FAQ

What is the best shape for Shopify swatches?

Circles for colors, Pill-Small for sizes, Rounded Rectangles for materials or patterns. Shapes from different attributes mixed in the same row look broken.

How big should a swatch be on mobile?

Make sure the touch target is large enough (at least 44px) – if you are showing a visible swatch, the visible area can be smaller than the total touch area as long as you add padding to make the total touch area 44px.

Should I use color swatches or image swatches?

Color swatches for solid colors and image swatches for patterns, textures, and prints. Mixing both in one row when the attribute values mix solid and patterned.

What gap should I use between swatches?

8 to 12 pixels. It’s tight enough for not making the row look ugly, but loose enough that you wont over tap on a mobile device.

How do I make the selected swatch obvious?

Make the focus ring a plain 2px solid width, in a colour that starkly contrasts with the swatch and the page background. No, a slightly opaque gradient or faint underline is not acceptable here.

Do swatches need a focus state for keyboard users?

You can see the keyboard focus on the demo. This is always necessary to see on your site, and you should never set outline: none on a swatch element. It is a violation of WCAG and the European Accessibility Act.

Can I preview swatch designs before building?

Yes. We include a free swatch preview tool which renders the shapes, sizes and spacing for swatches so you can preview a bunch of combinations before even opening up the theme.

Our Shopify Apps

Smart Bulk Image Upload

Bulk upload product images from Google Drive & save time!

Rubik Variant Image & Swatch

Show only relevant variant images on your product pages.

Rubik Combined Listings Swatch app

Rubik Combined Listings

Link separate products as variants with beautiful swatches

CS – Export Product Images

Bulk export product images by vendor, collection or status

Blog Posts