
A customizable product variant swatches block that displays color and other option swatches for products. The block intelligently detects color-type options (supporting multiple languages) and displays either custom uploaded swatch images or automatic Shopify swatches. It supports both Shopify's native swatch system and fallback asset-based swatch images for enhanced customization.
| Setting | Description | Options |
|---|---|---|
| Show advanced settings | Reveals show tooltip, and visibility | Checkbox (default: false) |
| Setting | Description | Options |
|---|---|---|
| Product | Select the product to display swatches for | Product picker |
| Size | Size of the swatch circles | 8 - 44 px (default: 16) |
| Limit | Maximum number of swatches to display | 1 - 20 (default: 6) |
| Radius | Border radius for swatch circles | • None |
| Show tooltip | Displays swatch name in a tooltip on hover | Checkbox (default: true) Visible when Show advanced settings is on |
| Setting | Description | Options |
|---|---|---|
| Enable horizontal padding | Adds horizontal padding around the swatches | Checkbox (default: false) |
| Enable top padding | Adds top padding around the swatches | Checkbox (default: false) |
| Enable bottom padding | Adds bottom padding around the swatches | Checkbox (default: false) |
| Setting | Description | Options |
|---|---|---|
| Horizontal alignment | Controls horizontal alignment of the swatches | • Left (default) |
| Setting | Description | Options |
|---|---|---|
| Visibility | Controls when the block is visible | • All (default) Visible when Show advanced settings is on |
In Swatches or Options, enter comma-separated names in Swatch options to show additional options as swatches, such as Material, Scent. Slab also detects native Shopify swatches and recognizes color option names automatically. Swatches displays the first matching option in product option order. Options can display multiple swatch options.
Use Swatch metafield to provide fallback images or colors for swatch options from a product metafield that references metaobjects. Enter the metafield's namespace and key, such as custom.scents.
Start by connecting your source repository and choosing the pages you want to publish.
You can then browse your documentation and ask questions about the content your team has shared.