How do you change the placeholder colour on a angular/material input placeholder?
<mat-form-field> <input matInput placeholder="Name"> </mat-form-field>
Select the placeholder, position the pointer over a sizing handle, and then drag the handle until the placeholder is the size that you want. Select the placeholder, and then drag it to its new location. Select the placeholder, click the Format tab, and then make the changes that you want.
Placeholders can be used to enhance the experience of your application. You will, need set some custom widths to toggle their visibility. Their appearance, color, and sizing can be easily customized with our utility classes.
In the last version of angular you can remove the placeholder in the input and add a mat-placeholder in the mat-form-field and custom the css with a class
html :
<mat-form-field> <input matInput type="text"> <mat-placeholder class="placeholder">Search</mat-placeholder> </mat-form-field>
css:
.mat-focused .placeholder { color: #00D318; }
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With