Some inbuilt classes were already created for the eye icons. we have to use them <i> tag above the input field for password.

After adding the icon above password field. script is required to hide and show the password when clicked on it.

Script added uses toggle class to display the text or password when clicked. Then some styling is required to display the eye icon.



Finally an eye icon will be displayed and the password will show or hide when clicked on it will works.