📄 primereact/floatlabel

File: floatlabel.md | Updated: 11/15/2025

Source: https://primereact.org/floatlabel/

Introducing PrimeReact v11 Alpha 🥁Learn More

FloatLabel

FloatLabel appears on top of the input field when focused.

Import#


import { FloatLabel } from 'primereact/floatlabel';
         

Copy

Basic#


FloatLabel is used by wrapping the input and its label.

Username

<FloatLabel>
    <InputText id="username" value={value} onChange={(e) => setValue(e.target.value)} />
    <label htmlFor="username">Username</label>
</FloatLabel>
         

Copy

Accessibility#


Screen Reader

FloatLabel does not require any roles and attributes.

Keyboard Support

Component does not include any interactive elements.

  • Import

  • Basic

  • Accessibility

PrimeReact 10.9.7 by PrimeTek