ryy77
ryy77

Reputation: 1294

Remove focus underline border from Angular Material Select

How can I remove the focus underline line after I click on the Angular Material Select element? I attached the code. I will appreciate any help. Thanks!

 <mat-form-field>
            <mat-label>Selected account</mat-label>
            <mat-select matInput>
              <mat-option *ngFor="let account of accounts" [value]="account.value">
                {{account.viewValue}}
              </mat-option>
            </mat-select>
        </mat-form-field>

Upvotes: 2

Views: 6417

Answers (1)

progm
progm

Reputation: 2858

Add the following:

name.component.css:

::ng-deep .mat-form-field.mat-focused .mat-form-field-underline {
  display: none;
}

Upvotes: 4

Related Questions