Placeholder Animation CSS - Floating Label Animation - Move placeholder to top | No Javscript

Published: 18 October 2020
on channel: smashtheshell
12,089
208

Placeholder animation can help improve the form user experience by letting you move placeholder to top on focus and while typing so that placeholder is always visible hence improving the overall form filling experience. To create an animated placeholder text we can use label element along with the input element.
And then we can create a floating label animation by simply styling the label element to make it look like placeholder text and then animating the label element on input :focus state. We can move up the input placeholder text / label while typing in such a way that input placeholder always visible by using :input-shown state.
To move up the placeholder text we can use CSS transform and translate the placeholder text to slide it to the top.

By creating our own custom css placeholder text we can apply different placeholder css style. We can easily change the placeholder color, placholder style, placholder visibility, placeholder font and size. The interesting part is that we can easily animate the placeholder text using pure css without any javascript or jquery. We will be using :focus and :input-shown states to slide the placeholder text/label to the top while typing and on focus state on the input element.

Sometime placeholder text animation is also called floating label animation or sliding the placeholder text to the top or move up the placeholder while focus and typing. But it creates the same smooth text animation for the input placeholder.

============Awesome Videos on CSS3=============

Responsive Login Form with Animated Placeholder Text - HTML, CSS & Javascript in 2020
   • Responsive login form with animated i...  

How to Apply Gradient Animation on button background in CSS
   • How to Apply Gradient Animation Effec...  

Clip image to text using CSS background-clip | CSS Text Knockout Effect
   • Clip image to text using CSS backgrou...  

CSS Sticky Header - Fixed Navigation Menu Bar on Scroll using HTML5 and CSS3
   • CSS Sticky Header - Fixed Navigation ...  

Creating Automatic CSS Image slider with CSS3 animation & HTML5 | No Javascript or Jquery - Tutorial
   • Creating Automatic CSS Image slider w...  

Simple Responsive Navigation Menu Bar with Logo on Left Using HTML5 and CSS3 Flexbox - Tutorial
   • Simple Responsive Navigation Menu Bar...  

How to Create Masonry Layout CSS3 & HTML5 - Material Design Card Based Pinterest Like Column Layout
   • How to Create Masonry Layout CSS3 &  ...  

How to Create Download Link in HTML5 | Making Direct Downloadable Button for Any File Type
   • How to Create Download Link in HTML5 ...  

How to Create Simple HTML5 / CSS3 Preloader Animation | Circular Spinner Preloader - Youtube
   • How to Create Simple HTML5 / CSS3 Pre...  

How to add a Preloader in Website using HTML, CSS and Javascript
   • How to add a Preloader in Website usi...  

Source Code:
https://codepen.io/smashtheshell/pen/...


Find all the source codes here:
https://codepen.io/smashtheshell

Follow on Twitter
  / amit4kp  

Add on Facebook
  / kumaramit24chd  

Like Page on Facebook
  / smashtheshell  

Share this video and Subscribe to this channel for latest updates and web design tips and techniques.

--------------------------------------------Attributions---------------------------------------------
Thumbanil Arrow Credit:
https://www.flaticon.com/authors/freepik


Watch video Placeholder Animation CSS - Floating Label Animation - Move placeholder to top | No Javscript online without registration, duration hours minute second in high quality. This video was added by user smashtheshell 18 October 2020, don't forget to share it with your friends and acquaintances, it has been viewed on our site 12,089 once and liked it 208 people.