0

Hi I am using angular material, I like to change the material input focus color on click

Right now by default it is showing in purple color, I like to change white color

enter image description here

I tried with lot of css. But nothing is working for me

Below is the example of stackblitz URL

https://stackblitz.com/edit/material-input-sample?file=src/app/app.component.ts

1 Answers1

2

You can modify the css of the mat-input elements by using ::ng-deep.

::ng-deep {
  .mat-form-field-label {
    color: white !important;
  }

  .mat-form-field.mat-focused .mat-form-field-ripple {
    background-color: white !important;
  }
}

Example in stackblitz

Drashti Dobariya
  • 2,455
  • 2
  • 10
  • 23