push to hide password input

How we can create a show and hide password input with an animation effect? Solution: See this Push To Hide Password Input Using jQuery CSS, Show/Hide Password.

Previously I have shared Show Hide Password Input, but this is with a push and ripple animation effect. Basically, when we put a password on fields like login and signup form, then there is a button for show password characters. By default, HTML password input doesn’t show characters but we can see after converting the input to text. This program is all about the switch between password and text input with animation effects.

Today you will learn to create the Show/Hide Password program with ripple click effect. Basically, there is a password field with an SVG eye icon and at first, you can see the password’s characters because it is text input. When you will click on the eye icon, the whole field will push in the icon direction and the password will hide. And on another click it will visible, when you will click on the icon you will see a push effect and a ripple effect.

So, Today I am sharing Push To Hide Password Input Using jQuery CSS. There I have used CSS for styling and jQuery for functioning. And as we know jQuery is a JS library that’s why I am putting this JavaScript category. The eye icon is not based on any library or any PNG image, this is an SVG shape.

If you are thinking now how this push to hide password program actually is, then see the preview given below.

Preview Of Show Pass With Ripple Effect Click

See this video preview to getting an idea of how this program looks like.

Live Demo

Now you can see this visually, also you can see it live by pressing the button given above. If you like this, then get the source code of its.

You May Also Like:

Push To Hide Password Input Using jQuery CSS Source Code

Before sharing source code, let’s talk about it. First I have created a main div named container, and placed two divs, one input and one label inside it. The first div for creating the ripple effect on click and the second div for creating toggle effect, also placed an SVG icon inside the second div. I have created a text input with ID name, placeholder, and label, later it will change to password input on click.

Now using CSS I have placed all the elements in the right place, as you can see in the preview. With CSS I gave size, position, margin, padding, etc values to the elements. For creating the ripple effect I have used flex display, transition command, and CSS @keyframe animation. There I have used transform command many times.

jQuery handling here the toggle feature and show animations of this program. First, fetched all the elements using document.querySelector() command and stored in variables. Later it changing the input type between text and password according to action, also it adding and removing CSS class names.

Left all other things you will understand after getting the codes, I can’t explain all in writing. For creating this program you have to create 3 files. First file for HTML, second for CSS, and the third file for JavaScript. Follow the steps to creating this without any error.

index.html

Create an HTML file named ‘index.html‘ and put these codes given here.

style.css

Now create a CSS file named ‘style.css‘ and put these codes given here.

function.js

The final step, create a JavaScript file named ‘function.js‘ and put the codes.

That’s It. Now you have successfully created Push To Hide Password Input Using jQuery CSS, Show/Hide Password. If you have any doubt or question comment down below.

Thanks For Visiting, Keep Visiting.

LEAVE A REPLY

Please enter your comment!
Please enter your name here