javascript image password strength

How we can check a password strength with an image? Solution: See this JavaScript Image Password Strength Detect, Check Pass With Image.

Previously I have shared a jQuery password strength checker which was very advanced, but this is a basic checker with a blurred image. Basically, all user management websites like social media, eCommerce, etc use form validation. In form validation, majorly we check valid email, phone, and password. And the most complicated validation we set for password inputs for help users to choose a strong password.

Today you will learn to create Check Pass With Image. Basically, there is a background image and password input. The background image is completely blurred at first, but when you will put characters it will clear. We have to put a password with 8 characters to completely reveal the image. And the strength checker only detects the length of the pass, nothing else.

So, Today I am sharing JavaScript Image Password Strength Detect. There I have used pure JavaScript to creating this program, there is no jQuery or any other library. Also, I have used an HTML CSS library for creating the layout for less custom CSS. I know this is a demo program, but you can improve it then you can use it on your website also.

If you are thinking now how this image pass checker actually is, then see the preview given below.

Preview Of Check Pass With Image

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:

JavaScript Image Password Strength Detect Source Code

Before sharing source code, let’s talk about it. First, I have created a div for placing the image, and another div for placing password input and label using HTML. For creating the layout easily I have used an HTML CSS library, which is tailwind (get). We just have to put class names for placing elements and styling them.

Now using CSS I did few works, like position, font, image, etc. I have placed a background image using CSS background-image: command. And given the height of the body and image 100vh, it means the full screen of any device. Also, I have blurred the image by 20px using filter: blur(20px); command.

JavaScript doing here the main work of the program. First, It fetching the image and password input using document.getElementById command. After that, I have created an event listener to reducing the blur value according to character length. 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 for HTML, second for CSS, and the third 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 below.

style.css

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

function.js

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

That’s It. Now you have successfully created JavaScript Image Password Strength Detect, Check Pass With Image. If you have any doubt or questions comment down below.

Thanks For Visiting, Keep Visiting.

3 COMMENTS

LEAVE A REPLY

Please enter your comment!
Please enter your name here