Switch CSS Classes

Note: This feature is only available to Wix Studio users.

You can use the classes listed below to style your Switch elements with CSS.

For more information on styling your elements with CSS, see Styling Elements with CSS and the MDN CSS reference docs.

Important: Element structure and undocumented class names may change without advance warning. To avoid unintended style changes to your site, select elements with the documented class names only.


Targets switch elements. For example:

.switch {
display: block;
position: relative;
transition: .5s;
css | Copy Code


Targets switch label text. For example:

.switch__label {
font-family: sans-serif;
font-weight: 700;
text-transform: lowercase;
color: black;
css | Copy Code


Targets switch track elements. For example:

.switch__track {
background-color: #dfd2f4;
box-shadow: 0 0 1px #2196F3;
css | Copy Code


Targets switch handle elements. For example:

.switch__handle {
background-color: white;
css | Copy Code

Was this helpful?