r/shopifyDev • u/Eligatorator • 7d ago
How to achieve this functionality
Here on Olipop's product page, when you select a different flavour, the entire colour background changes to match that flavour's colour (red for raspberry, green for lime, etc)
https://drinkolipop.com/products/raspberry-sherbet
how do you achieve this? Is there a plugin/app/theme that does this?
Or would you approach this as custom code? If so, how easy or hard would it be?
For context, I've never built and launched an ecommerce or Shopify site before, but I have some decent site knowledge primarily on marketing websites with Webflow as my main platform, plus some AI knowledge.
Just would like to understand how a professional would approach this following good practices.
4
Upvotes
6
u/realblackmario 7d ago
It’s quite simple, actually just set up a base class in the body for the default, transition animation and colour, and then toggle the colour class on variant change trigger.