Anyone know the css to change the color of a switch?
I’m on the business plan.
Anyone know the css to change the color of a switch?
I’m on the business plan.
The above answer is not entirely accurate. You should use this code (note, that it will change the color of all switch components in the app).
.switch-checked .track {
background-color: red !important;
}
If you only want to change the switch color of one switch, you’ll need to:
first add it to a container (because for whatever reason, the switch component doesn’t have a CSS box)
add a css class to the container (eg. red-switch-box
)
edit the above CSS to include the container class like this:
[class*="red-switch-box"] .switch-checked .track {
background-color: red !important;
}
End result:
This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.