floatLabel property of mat-form-field doesn't work
See original GitHub issueI use floatLabel property of mat-form-field, but it doesn’t work.
<mat-form-field [floatLabel]='always'>
<mat-label>CyberSource Reference</mat-label>
<input matInput placeholder="(Enter reference)" />
</mat-form-field>
It has ‘CyberSource Reference’ as placeholder. Then it move to label on focus. Behavior doesn’t change with any value of floatLabel property. Any Ideas? MatFormFieldModule is loaded to my app. Thanks.
“@angular/material”: “^5.0.4”
Issue Analytics
- State:
- Created 6 years ago
- Comments:5 (1 by maintainers)
Top Results From Across the Web
Angular/Material mat-form-field input - Floating label issues
That means if a mat-label is not present with the form field then placeholder will start behaving like the label and it floats...
Read more >Form field - Angular Material
The floatLabel property of <mat-form-field> can be used to change this default floating behavior. It can be set to always to float the...
Read more >Switching Off the Float Label of Our Angular Material Form Field
We have a material search form field: <mat-form-field><input matInput placeholder="Search"></mat-form-field>. And we want to turn off the floating label.
Read more ><mat-label> in Angular Material - GeeksforGeeks
mat -label is similar to labels which we use in normal HTML forms. But the advantage with mat-label is that it has pre-defined...
Read more >Floating Label - Material Design
Every Text Field and Select should have a label, except for full-width text fields, which use the input's placeholder attribute instead. Labels are...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
This is just a syntax error:
or
Yes, it is true, thank you -_-