Home > Net >  Make constant floating label in mat input field in angular
Make constant floating label in mat input field in angular

Time:10-02

I have code where I am using form input fields so there I don't want that label should float it should be fixed on the left top corner over outline that how it look like after getting the focus. So for reference I am attaching here the video and image that what it looking and what I want actually.

I have attached image for reference what the output I want that the floating label should always be constant up side image fixed floating label

And Added a link here for that how it is looking like currently

CodePudding user response:

You can use the floatLabel input as such:

  <mat-form-field appearance="outline" floatLabel="always">

updated example

documentation

  • Related