Manisha
Manisha

Reputation: 13

Make constant floating label in mat input field in angular

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

Upvotes: 1

Views: 1083

Answers (1)

Akirus
Akirus

Reputation: 574

You can use the floatLabel input as such:

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

updated example

documentation

Upvotes: 3

Related Questions