Turning off the Floating Placeholder on Angular Material Input Fields

Ole Ersoy
1 min readSep 30, 2019

--

Photo by Lance Anderson on Unsplash

Scenario

When we click on an Angular Material input field the placeholder label floats to the top. We want to turn this off.

Approach

Add floatLabel=”never” directive:

<mat-form-field floatLabel="never">
<input matInput placeholder="Search">
</mat-form-field>

--

--

Ole Ersoy
Ole Ersoy

Written by Ole Ersoy

Founder of Firefly Semantics Corporation

No responses yet