Overview
This tutorial shows how to change the toggle colors used in Upcart’s add-on module, including shipping protection or any product-based toggle. Custom-colored toggles can help highlight important upsells and create a more cohesive visual experience. This approach is best for store owners or developers with basic CSS knowledge.Where to find the custom CSS editor
- Go to Upcart > Cart Editor > Settings > Custom CSS
- Scroll to the bottom of the page and paste the CSS code into the input field
- Click Save
- Refresh your storefront to see the changes applied
Sample CSS for toggle customization in V1.0
The CSS below adjusts the toggle background color (on and off states), the toggle handle color, and resets other elements to avoid visual conflicts.Sample CSS for toggle customization in V2.0
How to customize
You can change the values inbackground-color, color, and the rest using any valid color format:
- Named colors (example:
white,black) - Hex codes (example:
#ff0000) - RGB values (example:
rgb(0, 132, 255))