Hello everyone,
I’m new to WeWeb, and I don’t speak English very well, so I apologize if I make any mistakes.
I’m trying to implement Floating Labels in a WeWeb form, but I couldn’t find a built-in option for this behavior.
What I want to achieve:
- When a user clicks on an input field, the placeholder should move above the input field, acting as a label.
- If the field is empty, the label should return to its original position inside the field.
- This is a common UX pattern used in many modern forms (Google Material Design, Bootstrap, etc.)
Example of Expected Behavior:
Before clicking on the input:
markdown
CopiaModifica
-----------------------
| Enter your name | <- Placeholder inside
-----------------------
After clicking (or when a value is entered):
markdown
Name
-----------------------
| John Doe | <- Label moves up
-----------------------
Is there a native way in WeWeb to achieve this Floating Label effect?
Can WeWeb detect if an input field is empty or filled without writing custom JavaScript?
If I must use CSS, is there a recommended way to structure the form fields in WeWeb?
Thanks in advance for any suggestions! 
Ben
1 Like
You can do this with states and position absolute. There also is an “advanced placeholder” option on WeWeb’s native inputs.
Thank you for your response Broberto.
I have checked WeWeb’s native inputs, but I can’t find the “Advanced Placeholder” option. Could you please guide me on where to locate it?
Additionally, I would love some more details on the states and position absolute approach.
For the “Advanced Placeholder”:
- Is it a built-in option for all input fields?
- How does it work? Does it automatically move the placeholder above the input when the user types?
For the “States + Absolute Position” method:
- Do I need to manually create a label and move it with a WeWeb state when the input is focused?
- Could you share an example setup or a small step-by-step guide?
I am new to WeWeb, so any detailed explanation or example would be really helpful! 
Thanks in advance for your support!
Thank you for your suggestion! 
I successfully implemented the floating label effect by using States as you suggested.
What I did:
- I created a label positioned absolutely inside the input container.
- I added a WeWeb state that checks if the input field has a value.
- When the input is focused or contains text, the label moves up using the Animations panel.
- When the input is empty, the label returns to its original position.
It works smoothly and looks great! Thanks again for the help. 
2 Likes
Haha, Broberto, you got me!
AI definitely helps me write better English and communicate more clearly. Plus, it’s a lifesaver for finding solutions in WeWeb! 
By the way, your suggestion about using States was the main input that led AI to the solution, so thanks again! 
If you have any further insights on the “Advanced Placeholder” option you mentioned, I’d love to explore it. The AI solution works well, but it’s quite time-consuming, and applying it to all forms takes a lot of effort.
Any extra tips would be much appreciated!
1 Like