custom-element-password-toggle

1.1.1 • Public • Published

Password Toggle Custom Element

Donate Netlify Status

Getting started

This component is a Custom Element written in pure vanilla JavaScript. It's designed to toggle the password visibility in an easy way.

Installation

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> 

Basic Usage

Just add is="password-toggle" on your input fields:

<input type="password" is="password-toggle" />

Development

Project setup

$ yarn install
$ yarn serve

Tests

Jest and Puppeteer are responsible to test this component:

$ yarn test

Linter

Prettier and ESLint are responsible to lint and format this component:

$ yarn lint
$ yarn format

Contributing

Do not hesitate to contribute to the project by adapting or adding features ! Bug reports or pull requests are welcome.

License

This project is released under the MIT license.

Readme

Keywords

none

Package Sidebar

Install

npm i custom-element-password-toggle

Weekly Downloads

0

Version

1.1.1

License

MIT

Unpacked Size

5.9 kB

Total Files

7

Last publish

Collaborators

  • guillaumebriday