Coding help! Make variants swatches bigger

Coding help! Make variants swatches bigger

leoking
Explorer
87 0 10

My url is ee3dc1-3.myshopify.com

my swatches are way too small please go on this link to see the variants https://lexxyy.com/products/caspium

I would like it to be quite bigger 

IMG_0566.jpeg

Replies 2 (2)

DitalTek
Shopify Partner
891 103 122

Hi @leoking ,

How is size do you want to increase for variant?

DitalTek_0-1746630152901.png

Will it look like this?

- You can please Like and Accepted Solution if my suggestion helpful.
- And you want to hire developer Theme or App Shopify => Feel free to send me a DM or contact to us via Email | WhatsApp
- Website: ditaltek.com

swym
Trailblazer
202 42 89

Hi @leoking

 

The swatch size can easily be modified by adding some very simple styling to your theme.

 

Here’s a step-by-step guide to do this:

 

1. Open the Code Editor for the theme where you would like to apply the modifications as directed in the example screenshot below.

 

swym_0-1746637814380.png

 

2. Let’s create a new snippet titled "custom-swatch-styles.liquid" to add these modifications. We suggest using a snippet so you can easily remove/include it as needed. Also, adding these changes using this snippet will ensure that they do not get overridden by any styles added before it. The screenshot below shows how to create a new snippet. 

swym_1-1746637911319.png

 

3. Now, inside this file, paste in the below code:  

<style>

   /* FOR DESKTOP SCREENS */

   .product-form__input input[type='radio'] + label.color-swatch.variant-swatch {
      width: 75px;     /* adjust these values as per your requirement */
      height: 75px;    /* adjust these values as per your requirement */
   }

    /* FOR MOBILE DEVICES */

  @media only screen and (max-width: 767px){
     .product-form__input input[type='radio'] + label.color-swatch.variant-swatch {
        width: 75px;   /* adjust these values as per your requirement */
        height: 75px;  /* adjust these values as per your requirement */
     }
  }

</style>

 

4. Finally, let's render this file inside your theme.liquid file at the bottom just before the closing body (</body>) tag. Screenshot below for reference.

swym_2-1746638645595.png

 

5. Done? Now save the file and try previewing the store, the swatches should look bigger as shown in the screenshots below:

For Desktop: 

swym_3-1746638704820.png

 

For Mobile:  

swym_4-1746638736635.png

 

I hope this helps! 

 

If my response helped you, please consider giving it a like (👍) and marking it as an accepted solution if it resolved your issue. Your feedback helps other community members with similar questions. 

 

Thank you!

 

Regards, 

Aaryan from Swym

 

- Appreciate the assistance. Show your approval with a Like! And when your question finds its answer, seal the deal by marking it as an Accepted Solution!
- Our Solutions: Wishlist Plus | Swym Back in Stock Alerts | Swym Gift Lists and Registries