Ankita Jaiswal
Ankita Jaiswal

Reputation: 262

Customize Mat-checkbox Indeterminate icon

Default Icon for MatCheckbox Indeterminate is like below:

Default

I want to customize it to look like this:

Customized checkbox

Upvotes: 0

Views: 6665

Answers (1)

UkFLSUI
UkFLSUI

Reputation: 5672

Add this code to your styles.css:

.mat-checkbox-indeterminate.mat-accent .mat-checkbox-background {
  border: 2px solid #757575;
  background: #68d0e5;
  clip-path: polygon(0 0, 0% 100%, 100% 0);
  padding: 30%;
}

Here's a working example: https://angular-ve9hge-zjec5e.stackblitz.io

Upvotes: 5

Related Questions