All docs pages

Liane docs › Guides

Product options and swatches

When a product comes in colors (or patterns or finishes), Liane can show each choice as a swatch drawn by the preset’s tool instead of a word. The swatches come from Shopify’s own color settings, so you set them up once for each color and they appear everywhere.

Set up swatches

  1. In your admin, open the product and give it a category. The category suggests options such as Color.
  2. When you add the color option under Variants, link it to the category’s Color metafield, so each value becomes a Color entry.
  3. Set each color’s swatch in Content › Metaobjects › Color: a color, or an image for patterns and textures.

Each color entry is shared by every product that uses it, so you set a color’s swatch once.

A value without a swatch whose name is also a color word browsers know, such as Black or Ivory, gets that color. Any other value without a swatch shows an empty outline, so set a swatch for every value.

Where swatches show

  • Product page: the Product information section’s Variant picker block, with Type set to Buttons and Show swatches on. The Dropdown type shows names only.
  • Product cards: Theme settings › Product cards › Show color swatches. A card shows five swatches, then +N for the rest (three on narrow cards).
  • Filters: in Shopify’s Search & Discovery app, set the color filter to show as swatches.
  • The menu: in a mega menu column whose links are mostly color names, each link gets a swatch. See Menus.

Sold-out choices

A sold-out choice keeps its color, is crossed out in the drawing tool’s hand and named as sold out. A line under the options links to the nearest choices that are in stock.

A chart of every color

To show all of a product’s colors together, add the Color chart block to the product page. It opens a chart of every color from the swatches. See Color and size charts.