Desktop · 1280px · shown at 0% · edit the text, images and colours in the panel
Floating Label Form — Free Website Section Template
Forms · v1.0.0 · Updated 2026-11-12 · Responsive · GSAP animation · HTML, React & Vue
Extend with AI
Take This Section Further With AI
The AI prompt for this one is for Patreon supporters ($3 a month), along with a site with no ads. Supporters enter the passcode once and it is remembered in this browser.
What's included
Features
About this section
Floating Label Form — Free HTML & CSS Form Where Labels Glide Up

Floating Label Form is a free lead and contact section where each label sits inside its field and glides up when you click or type, a pattern popularised by Material Design. Here it is done with CSS only: the input has a blank placeholder, and the label moves with the :placeholder-shown and :focus selectors, so there is no script to load and nothing to break.
Beside the form, a list of promises
On the left the section has a heading, short text and a checklist for what the visitor can expect (a reply within a day, no sales pressure, a free call). Promises near a form lift completion because they answer “what happens after I press send?”. The list is one line per promise and you can empty it.
Fields and sending
The form asks for name, work email, an optional company and phone, a message and an optional opt-in for updates. Empty a label and that field is removed. Every form posts to the address you paste into "Form URL" (Formspree, Basin, Getform or your own server), shows a success message, shows an error message when something fails and contains a hidden spam-trap field. Without JavaScript it is an ordinary form post. For a classic label-above layout see the Centered Contact Form.
Accessible floating labels
Each label is wrapped around its input, so clicking the label focuses the field and screen readers announce it. The floated label is shrunk, not hidden, and the focus ring and error colours follow your theme. Because the label stays visible after typing, people never forget what a field is for.
Why use it
Why Use the Floating Label Form
How it’s different
How It’s Different From Other Free Section Templates
Step by step
How to Use
- 1Edit the contentFill in the heading, promises and form in the panel. Wrap words in *asterisks* to colour them.
- 2Add your imagesUpload your own images (resized in your browser and kept on your device) or paste a hosted image URL.
- 3Match your brandPick a colour preset or exact colours, choose heading and body fonts from Google Fonts or your own uploaded font, set the corner radius and width, or apply your brand kit.
- 4Animate and previewChoose a GSAP entrance effect and speed, press Play animation, and check the section on desktop, tablet and mobile.
- 5Save and exportSave it to My designs, then export a single HTML file, a ZIP with your images, a React or Vue component, or fork it into My Code.
Real-world uses
Common Use Cases
Got questions?
Frequently Asked Questions
The input has an empty placeholder (a single space). When the field is focused or not showing that placeholder, a CSS rule moves and shrinks the label that follows it.
They are fine when the label stays visible and readable, as here. The label is a real label element wrapped around the input, it is never replaced by placeholder text and it keeps enough contrast when it floats.
Yes. Export the HTML or fork to My Code, copy one of the field blocks and change its name and label. Each field is a label containing an input and a span.
Paste your Formspree, Basin or Getform address into the Form URL field. Fields sent are name, email, company, phone, message and updates.
Yes, use the Copy React component or Copy Vue component export. The CSS and the form behaviour script are included.
It saves an editable copy of your Floating Label Form in My Code, the UI Snippets code editor: the section markup goes in the HTML panel, its CSS (theme variables, base styles and layout) in the CSS panel, and the GSAP library is added as a CDN link, so you can keep refining the code and save your own versions.
Yes. Every section is free for personal and commercial work, with no account, no watermark and no attribution: export it on its own as HTML, React, Vue or Next.js from its page, or use it in a website you build and export in the Website Builder.