show_password
v0.0.3
Published
The easiest way to show and hide the text inside a password field.
Downloads
3
Readme
ShowPassword
The easiest way to show and hide the text inside a password field.
Install
npm install show_password --save
Usage
Note: To use in a Node project, you'll have to use a package like jsdom to access to document
object.
var ShowPassword = require('show_password')
ShowPassword.initialize()
Add a wrapper div
with an id
of showPassword
around your password input field.
<div class="showPassword">
<input type="password">
</div>
That's it!
Rails setup
yarn add show_password
Then, add the following to application.js
:
//= require show_password/show_password
Configuration
You can use the ShowPassword.config
object to configure ShowPassword.
config.color
: Change the color of the visibility icons.