Skip to main content
Jul 19, 2022 11:46 AM UTC
Solved

How to use CSS to change Toggle Button Dimensions

Hi everyone,

How I can change the size dimensions on Toogle Button? 

HD_10225728_0-1658233635091.png

 
I have tried giving the toggle button the custom class slider-checkbox, but that didn't work.
 
.slider-checkbox {
    width: 79px!important;
    height: 52px!important;
}
 

Has anyone found the CSS solution for this?

 

Thank you!

nmillesonAnswer
Jul 19, 2022 1:20 PM UTC

Try this:

 

ptcs-toggle-button::part(rectangle){
 width: 100px !important;
 height: 50px !important;
}

ptcs-toggle-button::part(oval){
 width: 50px !important;
 height: 40px !important;
}

 

nmilleson_0-1658236812836.png

 

2 replies

nmillesonAnswer
Jul 19, 2022 1:20 PM UTC

Try this:

 

ptcs-toggle-button::part(rectangle){
 width: 100px !important;
 height: 50px !important;
}

ptcs-toggle-button::part(oval){
 width: 50px !important;
 height: 40px !important;
}

 

nmilleson_0-1658236812836.png

 

Jul 19, 2022 2:03 PM UTC

Thank you so much!! Worked perfectly 🙂