Guide · Apparel

Show colour availability for the selected clothing size

When a colour is missing in only one size, decide whether its swatch should be crossed out, dimmed or hidden once the shopper has chosen a size, and test it before it goes store-wide.

Two colour rows for the same shirt: with size S selected Navy, White and Sage are all available; with size M selected the Sage swatch is faded and crossed out.
On this pageAvailability depends on the other choiceChoose the sold-out lookWhat the app does not changeTest it on one productCheck the option style tooWhere to go next

A shopper opens your linen shirt, picks size M, and then looks along the colour row. Navy and White are fine. Sage was a favourite, but you have no Sage in M. What should that swatch do? If it looks the same as the others, the shopper clicks it, finds nothing to buy and may leave. If it vanishes, they may wonder where the colour went.

This guide is about that moment inside one product with Colour and Size options: how Datima Color Swatches shows a colour that cannot be bought in the size already chosen, and how to pick a look that fits your range.

Availability depends on the other choice

In a product with Colour and Size, stock sits on the combinations. Sage may be available in S and L but not in M. So "is Sage sold out?" has no single answer; it depends on what else the shopper has selected.

Color Swatches follows that logic. Its Sold out setting applies to a value that has no variant in stock for the current selection. Choose M and Sage is out of stock for that selection; choose L and the same swatch looks normal again. The swatch is judged against the shopper's current choice, not against your total stock for the colour.

The same shirt, three selections
Shopper has selectedNavyWhiteSage
Size SIn stockIn stockIn stock
Size MIn stockIn stockNo M in stock: sold-out look
Size LIn stockIn stockIn stock

The stock in this table is an invented example, used to show the idea.

Choose the sold-out look

The Sold out setting offers three looks: Cross out, Dim and Hide. It is one setting on the Settings page, so it applies to every swatch on your store, not to a single product.

  • Cross out keeps the colour in its place and marks it unavailable. A shopper who changes size can see why it changed, and the row does not jump around.
  • Dim softens the swatch without striking it through. It is a quieter signal and suits a range where most colours are in most sizes.
  • Hide removes the swatch while the size is selected. The row stays short, but the colour appears and disappears as the shopper changes size, which can be confusing if they are comparing colours.

For size-sensitive ranges, where a colour is often missing in only one or two sizes, a look that keeps the swatch in place (Cross out or Dim) is usually easier to follow than one that moves it. That is a merchandising judgement, not a measured result; test it on your own products.

What the app does not change

  • A sold-out swatch stays clickable. The app does not block the click. Your theme still shows its own sold-out message and price, so check what your theme says once the unavailable combination is selected.
  • A hidden value that is the shopper's current selection is dimmed instead. If a shopper is on Sage and then picks a size Sage lacks, the Sage swatch does not disappear under them.
  • The app draws the choice; it does not create stock. It does not make an unavailable combination purchasable or change what your theme allows in the cart.

This is different from the Combined Listings case, where each colour is a separate product page. Here Colour and Size are options on one product, so the question is which combination is out of stock. If your colours are separate products, see what to do when a clothing colour sells out instead.

Test it on one product

This is a method to run, not a record of a run. Pick a product where one colour is missing in exactly one size, for example Sage in M, and leave the other colours and sizes in stock.

  1. Open Settings in the app and find Sold out. Choose Cross out and press Save in the save bar.
  2. Wait a minute, because the storefront reads your swatches about once a minute, then open the product page.
  3. Select size S. Check that Sage looks normal.
  4. Select size M. Check that Sage now has the sold-out look.
  5. Select Sage, then change the size to L and back to M. Check the swatch keeps the selected state sensibly, and see what your theme shows for the unavailable combination.
  6. Click the sold-out Sage swatch. Note what your theme says and whether the cart button is clear.
  7. Repeat steps 3 to 6 with Dim, then with Hide. With Hide, check that selecting Sage first and then moving to size M dims it instead of removing it.
  8. Repeat on a phone, and on a collection card if you have turned on swatches on product cards.

Write down your theme, the date and what you saw for each look before you decide a store-wide rule. Because the setting is shared by every swatch, check one product from a different category, such as shoes, before you commit.

Check the option style too

The sold-out look only appears on options drawn by the app. If Size is set to Button or Text only and Colour to Swatch, the colour row is the one that reacts. An option left to the theme draws nothing, so the app adds nothing there. If a row does not appear at all, Swatches not showing on your store lists what to check in order.

Where to go next

Start with one size-sensitive product, set the look, and walk through the checklist on a phone. The Shape, size, names and sold-out looks guide has the click-by-click steps, Choose how an option shows covers the option styles, and the app page shows what the app covers. For naming and colour values, read turning clothing colour names into variant swatches.

Written by the Datima team

Practical guidance from the team building Shopify apps for product presentation and stock management. About Datima.