material angular slide toggle css code example
Example 1: mat slide toggle change color
::ng-deep .mat-slide-toggle.mat-checked:not(.mat-disabled) .mat-slide-toggle-thumb {
background-color: blue; /*replace with your color*/
}
::ng-deep .mat-slide-toggle.mat-checked:not(.mat-disabled) .mat-slide-toggle-bar {
background-color: skyblue; /*replace with your color*/
}
Example 2: mat slide toggle button
import {MatSlideToggleModule} from '@angular/material/slide-toggle';
<mat-slide-toggle>Slide me!</mat-slide-toggle>