Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Angular mat-checkbox different border-colors for different checkboxes

I need to change the border colors for the following checkboxes , one to green and other to red.

<div style="margin-left:30%;margin-top: 20%;">
    <mat-checkbox>Hello</mat-checkbox><br>
    <mat-checkbox>Hai</mat-checkbox>
</div>
like image 865
Nirmal Vishnu Avatar asked Mar 07 '26 03:03

Nirmal Vishnu


1 Answers

If you want to overrid specific checkbox border, you can override the class:

.mat-checkbox-frame {
  border-color: red; 
}

If you want to change checkbox color. There is a color attribute.

https://stackblitz.com/edit/angular-rwjynh

like image 68
huan feng Avatar answered Mar 09 '26 22:03

huan feng



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!