webdevpuneet.com

Floating Label Form

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

CategoryForms
Tagsfloating labelcontactformleadmodernsplitlight
Updated October 20, 2026

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.

· Become a supporter

What's included

Features

Floating labels built with CSS only (: placeholder-shown and :focus)
Heading, text and a checklist of promises beside the form
Name, work email, optional company and phone, message and optional opt-in
Fields vanish when their labels are emptied
Visible focus ring, invalid and valid border colours
Posts to Formspree, Basin, Getform or your own endpoint with success and error messages
Hidden spam-trap field; works as a normal POST without JavaScript
Theme colours, fonts and radius; export HTML, ZIP, React or Vue

About this section

Floating Label Form — Free HTML & CSS Form Where Labels Glide Up

Floating Label Form: A modern lead or contact form where each label sits inside its box and glides up when the field is focused or filled, built with CSS only. On the left a heading and a short list of promises, on the right the form card with name, email, company, phone and a message, an optional consent box, and the same working Formspree-style posting with success and error messages as every other form in this category.

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

✨
Modern and compact
Labels use the space inside the field, so the form is shorter without losing clarity.
🧩
No JavaScript for the effect
The animation is pure CSS, so it is light, fast and works everywhere.
🤝
Promises that convert
A short checklist beside the form answers what happens next.

How it’s different

How It’s Different From Other Free Section Templates

✎
Editable, not just copyable
Change text, links, images, colours and fonts in the browser before you export, instead of editing someone else’s code by hand.
◐
One theme for every section
Colours, fonts, radius and width are shared CSS variables, so every section you combine looks like one website.
⇲
Responsive by container
Container queries make each section adapt to its own width, in a full page, a column or a page builder.
✦
GSAP animation built in
Every section animates in with GSAP and ScrollTrigger, stays visible without JavaScript and respects reduced motion.
</>
HTML, React and Vue
Export a single HTML file, a ZIP with your images, a React component or a Vue component, or fork the code into My Code.
◍
Free, private, saved
No account and no watermark. Designs, uploaded images and fonts stay in your browser, with a backup file you can restore anywhere.

Step by step

How to Use

  1. 1
    Edit the contentFill in the heading, promises and form in the panel. Wrap words in *asterisks* to colour them.
  2. 2
    Add your imagesUpload your own images (resized in your browser and kept on your device) or paste a hosted image URL.
  3. 3
    Match 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.
  4. 4
    Animate and previewChoose a GSAP entrance effect and speed, press Play animation, and check the section on desktop, tablet and mobile.
  5. 5
    Save 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

🚀
SaaS and startup lead forms
Ask for a work email and company, add a promise list such as “reply in a working day” and capture demo or trial requests.
🎨
Agency and studio sites
Pair the modern floating labels with a brand colour and invite project briefs, with a free call as the first promise.
🧑‍🏫
Coaches and consultants
Offer a free discovery call with a short form and a note that spells out what happens after the request is sent.
🏗
Local service businesses
Capture phone numbers and short messages from mobile visitors, where big touch-friendly fields and labels that stay visible make filling the form quick and error-free.

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.