a password input with visibility native web component.
npm install native-password-input
Attribute | Default | Details/Example |
---|---|---|
name |
null | password |
placeholder |
null | Enter a password |
value |
null | 123456 |
open |
inexistant | Add this attribute to make password visible |
icon-color |
null | Color of icon |
Using ES6 Modules is required!
<!Doctype html>
<html>
<head>
...
</head>
<body>
<native-password-input
id="password"
placeholder="password..."
name="password"
open
>
</native-password-input>
<script src="./main.js" type="module"></script>
</body>
</html>
main.js
import "/node_modules/native-password-input/index.js";