How to Create Floating Labels on Webflow Inputs
Learn how to create floating labels on Webflow inputs with CSS transitions and JavaScript.
In this tutorial, Sandro, cofounder of Gemeos Webflow agency, shows you how to create floating labels on Webflow inputs: the label lifts above the field when the user starts typing.
Example
1. HTML structure in an Embed
Create the structure below in a Webflow Embed. The label and the input need to live in the same relative container.
2. The CSS
3. The script
Conclusion
Floating labels improve the UX of dense forms. See also: designing frictionless forms.
Lorem ipsum
Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur.






.avif)








