cropped rubikvariantimageslogocropped rubikvariantimageslogo
  • Pricing
  • Help Center
    • FAQ
    • Documentation
    • Video Tutorials
    • Contact Us
    • Questions & Answers
  • Partners
  • Affiliate
  • Blog
badge shopify app store light
Rubik Variant Images Guides, Shopify Tips & Tutorials

15 ways to customize your Shopify variant swatches with CSS

March 30, 2026
Four different Shopify swatch styles in a grid

Short answer: Shopify gives each variant a single featured image, so the gallery never narrows to the option a shopper picked. Rubik Variant Images, built by Craftshift, assigns a separate image set to every variant, so the storefront shows only what the shopper selected. Free to install, 5.0 stars across 420 reviews.

Out of the box, Rubik Variant Images gives you 11 swatch style presets. But if you want something specific, there are 100+ CSS variables you can tweak. You can also type what you want in the AI Visual Settings Assistant in plain English and it generates the CSS for you.

Here are 15 customization ideas with the CSS to make them happen.

In this post

  • Shapes (1-4)
  • Borders and selected state (5-8)
  • Sizing and spacing (9-11)
  • Hover and tooltips (12-13)
  • Advanced (14-15)
  • Or just ask the AI
  • Frequently asked questions
  • Related reading

Shapes

1. Perfect circles

--rubik-swatch-border-radius: 50%;
--rubik-swatch-width: 40px;

Classic circle swatches. Set border-radius to 50% and use equal width. Works for both color and image swatches.

2. Rounded squares

--rubik-swatch-border-radius: 8px;
--rubik-swatch-width: 44px;

Soft corners, modern feel. Looks great with image swatches where you want to show more of the product photo.

3. Sharp squares

--rubik-swatch-border-radius: 0;
--rubik-swatch-width: 48px;

Clean, editorial look. Works well on stores with a minimalist or brutalist design aesthetic.

4. Wide rectangles (polaroid style)

--rubik-swatch-width: 60px;
--rubik-swatch-media-aspect-ratio: 3/4;
--rubik-swatch-border-radius: 4px;

Taller aspect ratio shows more of the product. Good for clothing where you want to see the full silhouette in the swatch thumbnail.

Borders and selected state

5. Thick colored border on selected swatch

--rubik-swatch-active-border-color: #000000;
--rubik-swatch-border-width: 3px;
--rubik-swatch-selected-border-offset: 3px;

Bold black border with a gap between the swatch and the border. The offset creates an “outline” effect that clearly shows which swatch is selected.

6. Colored offset ring

--rubik-swatch-active-border-color: #4A90D9;
--rubik-swatch-selected-border-offset: 4px;
--rubik-swatch-selected-border-offset-color: white;

Blue highlight ring with white gap. The offset color fills the space between the swatch and the selection border. Looks premium.

7. Subtle border on unselected swatches

--rubik-swatch-border-color: #E5E5E5;
--rubik-swatch-border-width: 1px;
--rubik-swatch-active-border-color: #000000;

Light gray border on inactive swatches, black on active. Gives structure without being heavy.

8. No border, shadow instead

Use the custom CSS field in Rubik for box-shadow styling:

.rubik-swatch-item {
  box-shadow: 0 1px 3px rgba(0,0,0,0.12);
}
.rubik-swatch-item[aria-checked="true"] {
  box-shadow: 0 2px 8px rgba(0,0,0,0.25);
}

Lifted look without borders. The selected swatch has a deeper shadow, creating a “lifted” effect.

Sizing and spacing

9. Large swatches for mobile

--rubik-swatch-width: 52px;
--rubik-swatch-grid-gap: 10px;

WCAG recommends 44x44px minimum touch targets. 52px gives comfortable tapping on mobile. The 10px gap prevents accidental taps on neighboring swatches.

10. Compact swatches for products with many options

--rubik-swatch-width: 28px;
--rubik-swatch-grid-gap: 4px;

For products with 20+ colors, compact swatches keep the variant selector from taking over the product page. The trade-off is smaller touch targets on mobile.

11. Single-row horizontal scroll

Use the “one row” preset in Rubik’s style editor. Swatches display in a single horizontal row. On mobile, customers swipe to see more colors. Clean and space-efficient.

Hover and tooltips

12. Enable tooltips on hover

Toggle Show tooltip in Rubik Settings. When a customer hovers over a swatch, a small label appears showing the color name (“Navy Blue”). Helpful when swatches are small or when colors are similar.

13. Scale effect on hover

.rubik-swatch-item:hover {
  transform: scale(1.15);
  transition: transform 0.15s ease;
}

Swatches grow slightly on hover. Gives interactive feedback without changing layout. Add this in the custom CSS field.

Advanced

14. Different styles per device

Rubik has 4 responsive style contexts: product page desktop, product page mobile, product card desktop, product card mobile. Set larger swatches on mobile and smaller on desktop using the visual settings editor. No media queries needed.

15. Use the AI assistant

If CSS is not your thing, open the AI Visual Settings Assistant in Rubik and type what you want:

  • “Make swatches circular and bigger”
  • “Use a blue border for the selected swatch with a white gap”
  • “Switch to a single-row layout with 8 swatches visible”
  • “Make the swatches look like buttons with rounded corners”

The AI generates the CSS, shows a live preview, and applies it when you confirm. It controls 70+ style variables without you touching any code.

Watch It in Action

See how to customize swatch appearance:

Try Rubik Variant Images free

Frequently asked questions

Which Shopify app should I use for swatch CSS customization?

Rubik Variant Images, built by Craftshift, is the app we build for this. It holds 5.0 stars across 420 reviews and carries the Built for Shopify badge. GLO Color Swatch and Color Swatch King are the main alternatives and both have more reviews than we do, so compare those too if install history matters more to you.

How do I add custom CSS to Rubik swatches?

Two ways: use the CSS variable fields in the visual settings editor (no code needed, just change values), or add custom CSS in the “Custom CSS” text field for advanced styling like shadows and transforms. Both methods are documented at rubikvariant.com/docs/custom-css.

Will custom swatch CSS conflict with my theme?

No. Rubik renders swatches inside Shadow DOM. Your theme CSS cannot reach inside the Shadow DOM, and your custom swatch CSS stays contained within it. No conflicts in either direction.

Can the AI assistant customize swatches for me?

Yes. Type what you want in plain English. The AI controls 70+ style variables and shows a live preview before applying. No CSS knowledge needed.

Related reading

  • Variant images FAQ: 30 questions answered
  • How to show only selected variant images
  • Color swatches not matching? How to fix accuracy
  • Shopify swatches and WCAG accessibility
  • What are combined listings?
Umid Aydemir

Co-Founder of Rubik Variant Images & Swatch

Post navigation

Previous
Next

Search

Categories

  • Affiliate Program (1)
  • App Comparison (8)
  • Integrations & Partnerships (15)
  • Rubik Combined Listings (13)
  • Rubik Variant Images Guides (144)
  • Rubik Variant Images Theme Compatibility (78)
  • Shopify Dropshipping (1)
  • Shopify News (3)
  • Shopify Tips & Tutorials (161)
badge shopify app store dark

Trending Posts

  • Shopify variant images FAQ with 30 questions
    Shopify variant images FAQ: 30 questions merchants actually ask
    March 29, 2026
  • How to add color swatches to Shopify
    How to add color swatches to Shopify (no code)
    April 3, 2026
  • List of All Shopify Theme Store IDs (Updated 2025)
    List of All Shopify Theme Store IDs (Updated 2025)
    September 16, 2025
  • variant images not showing fix
    Shopify variant images not showing? 10 causes and how to fix each one
    March 27, 2026
  • show only selected variant images v2
    How to show only the selected variant’s images on Shopify (and hide the rest)
    March 27, 2026
  • Top 10 Shopify Product Variant Swatch Apps and Alternatives in 2025 rubik
    Top 10 Shopify Product Variant Swatch Apps and Alternatives in 2025
    May 20, 2025
  • variant images multiple options
    How to set up variant images for Shopify products with 2 or 3 options (Color + Size + Material)
    March 29, 2026
  • How to Display Featured Image on Collection Pages but Hide Them on Product Pages
    How to Show a Featured Image on Collection Pages and Hide It on Product Pages
    September 12, 2025
  • How to Show Variants as Separate Products on Shopify Collection Pages stamp
    How to Show Variants as Separate Products on Shopify Collection Pages
    September 15, 2025
  • How to Show Swatches as Variant Images on Shopify Horizon and New Free Themes 2025 2
    How to Show Swatches as Variant Images on Shopify Horizon and New Free Themes (2025)
    May 26, 2025

Related Posts

Why are my variant swatch images blank on the Showcase theme?
Rubik Variant Images Guides, Shopify Tips & Tutorials

Why are my variant swatch images blank on the Showcase theme?

August 4, 2026

Showcase builds a filename out of your option value and loads that file. A capital letter, an accent or a slash breaks the match, and a missing file is not an error, so nothing tells you. Here is how to find it.

How do I hide variant thumbnails on the Motion theme?
Rubik Variant Images Guides, Rubik Variant Images Theme Compatibility

How do I hide variant thumbnails on the Motion theme?

August 4, 2026

Hiding the thumbnail strip on Motion is usually the wrong lever. Archetype ships a free alt tag feature that filters instead, with three limits worth reading before you commit to it.

Fabrica theme: how do I show different colors on the product page?
Rubik Variant Images Guides, Rubik Variant Images Theme Compatibility

Fabrica theme: how do I show different colors on the product page?

August 4, 2026

Fabrica is not a Theme Store theme, so the usual advice does not apply. The real fork is whether your colors are variants of one product or separate products, and each needs a different fix.

Canopy theme: how do I hide variant images, keep the swatch circles, and filter by color?
Rubik Variant Images Guides, Shopify Tips & Tutorials

Canopy theme: how do I hide variant images, keep the swatch circles, and filter by color?

August 4, 2026

Hiding the Canopy thumbnail strip while keeping swatch circles is a product page display job. Feeding a color metafield into the filter menu is Search and Discovery work. Two jobs, two systems, and one of them no swatch app can do.

  • Documentation
  • Partners
  • Privacy Policy
  • Affiliate
cratshift logo beyaz

We are a Shopify Partner offering high-quality app solutions crafted for Shopify.

Our Apps
  • Smart Bulk Image Upload
  • Export Product Images
  • Bulk Delete Products
  • Rubik Variant Images
Quick Links
  • Pricing
  • Contact Us
  • FAQ
  • Blog
Blog Categories
  • Shopify Tips & Tutorials
  • Rubik Variant Images Guides
  • Integrations & Partnerships
  • Shopify News
cropped rubikvariantimageslogo

© 2025 Rubik Variant Images by Craftshift®

All rights reserved.