FloatLabel appears on top of the input field when focused.
import { FloatLabelModule } from 'primeng/floatlabel';
FloatLabel is used by wrapping the input and its label.
<p-floatLabel>
<input id="username" type="text" pInputText [(ngModel)]="value" />
<label for="username">Username</label>
</p-floatLabel>
Following is the list of structural style classes, for theming classes visit theming page.
Name | Element |
---|---|
p-float-label | Float label element. |
FloatLabel does not require any roles and attributes.
Component does not include any interactive elements.
API defines helper props, events and others for the PrimeNG FloatLabel module.