I am building a login page using ReactJS. I am using a custom text component built in-house, but unfortunately, it does not have a password masking option. Using the <input>
tag with type=password
is not an option. How can I make my password field appear masked (Dots instead of text) using Javascript/JQuery
?
Is it a viable option to read each keydown
event and replace the text with a dot while storing the char in a list or something on those lines?