The following approach will be implemented to toggle the visibility of the Password:
- The eye image (eye.png) will show the password to the user by changing the input type from password to text.
- The eye slash image (eyeslash.png) will hide the password from the user by adding the password type to the input.
- We will toggle the type of input field of the password from text -> password when clicking on the eye slash image and from password -> text on click to the eye image.
Share your thoughts in the comments
Please Login to comment...