Animated Login Form using HTML CSS & JavaScript

CodingNepal
3 min readMay 14, 2020

--

Animated Login Form using HTML CSS & JavaScript
Animated Login Form using HTML CSS & JavaScript

Hello readers, Today in this blog you’ll learn how to create an Animated Login Form with Password Show or Hide Button using HTML CSS & JavaScript. Earlier I have shared an Amazing Transparent Login Form. Now, it’s time to create this Animated Login Form with Password Show Hide Button.

As you know, A login form is a set of credentials used to authenticate the user before login into your website. Most often, these consist of a username and password.

In the image, you can see this is an Animated Login Form with a gradient background. Basically, in the image, there is not show password show or hide button. But when you entered some texts in the password field then the password show hide button will appear. I created those two login buttons of Facebook and Google plus is only for design. There is no action when you click on that button.

If you’re feeling difficult to understand what I am saying. You can watch a full video tutorial on this program (Animated Login Form).

Video Tutorial of Animated Login Form Design

Animated Login Form using HTML CSS & JavaScript

If you like this program (Animated Login Form UI Design) and want to get source codes. You can easily get the source codes of this program. To get the source codes you just need to scroll down.

If you’re a beginner you can use this Login Form in your project and websites. I believe this login form code will help you a lot. Or if you have some knowledge of JavaScript or PHP you can add some functions in this format and use it according to your requirements.

Animated Login Form HTML & CSS [Source Codes]

As always, before sharing the codes of this program (Animated Login Form). Let’s a few talk about the main tags and codes of this program. In the HTML File, First I created a <div> with the class name “container” and placed all other tags inside it. Then I created a <form> tag.

After that, I created another <div> with the class name “input-field” and placed two tags inside it one is <input> tag and another is <label>. And, I used a label tag to show username text. Then I copy and paste that “input-field” div tag to create a password field. After that, I created a <button> tag. The <button> tag defines a clickable button.

In the CSS File, First I reset default margins and padding to 0; Then I placed all elements at the center using Flex property. Then I put a gradient background image in the background. After that, I did basic styling to the container, inputs, and button. In the video you have seen, I used :focus pseudo-class for a slide up the label text. In the HTML File, for a button, I created a <div> with the class name “inner” for creating duplicate gradient layer. Then I did styling to button in the CSS File, to create that gradient hovers animation.

You can also download the source code files through the given link. In the source files, there you also get a background image of this program. Click here to download source code files.

Originally published at https://www.codingnepalweb.com on May 14, 2020.

--

--

CodingNepal

CodingNepal is a blog dedicated to providing valuable and informative content about web development technologies such as HTML, CSS, JavaScript, and PHP.