File: floatlabel.md | Updated: 11/15/2025
Introducing PrimeReact v11 Alpha 🥁Learn More
SearchK
10.9.7
FEATURES
API
THEMING
PASS THROUGH
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#
FloatLabel does not require any roles and attributes.
Component does not include any interactive elements.
Import
Basic
Accessibility
PrimeReact 10.9.7 by PrimeTek