This component is a Custom Element written in pure vanilla JavaScript. It's designed to toggle the password visibility in an easy way.
This package is written with the new ES6 syntax. You can import it directly in your browser with UNPKG.
<script defer type="module" src="https://unpkg.com/custom-element-password-toggle"></script>
You can also install it with npm or yarn:
$ yarn add custom-element-password-toggle
<script type="module" defer>
import 'custom-element-password-toggle'
</script>
Just add is="password-toggle"
on your input fields:
<input type="password" is="password-toggle" />
$ yarn install
$ yarn serve
Jest and Puppeteer are responsible to test this component:
$ yarn test
Prettier and ESLint are responsible to lint and format this component:
$ yarn lint
$ yarn format
Do not hesitate to contribute to the project by adapting or adding features ! Bug reports or pull requests are welcome.
This project is released under the MIT license.