Input Field Effect

Here is a second project in my  series of experiments on web interaction (see previous one here). The aim of this series is to get to know the tools available to bring interactivity to websites. I decided to build these experiments around lines just to give a direction to my projects. For this experiment, I worked on an input field effect. It was inspired by some tutorials on Codrops, namely the ones on Text Input Effects and Animated Checkboxes and Radio Buttons. Ideas were also taken from the Float Label Pattern first proposed by Matt D. Smith and its various implementations (see article here). For the lines, I use an SVG and I animate its width using CSS transitions when the field is in focus or filled. I set a class using Javascript on the field when it’s not empty like Peter Sorowka is doing in his Graceful Degradation (see CodePen here). Here is the result in an animated GIF. You can also try it out here.

InputFieldLineEffect