Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up

custom-element (web component). password field with a toggle visiblity switch to hide/show the password value.

NotificationsYou must be signed in to change notification settings

tobz-nz/x-password

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

13 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

A password input natively enhanced via a Custom Element (Web Component).

It adds the ability to toggle visibility and validation to confirm it matches the value of another field

Check it live.

Usage

<scriptsrc="https://tobz-nz.github.io/x-password/x-password.js"type="module"></script><formonsubmit="return false"><labelfor="password">Password</label><inputtype="password"name="password"id="password"><br><labelfor="password_confirm">Confirm Password</label><inputis="x-password"name="password_confirm"id="password_confirm"confirm-target="password"><buttontype="button"onclick="document.getElementById('password_confirm').toggleAttribute('visible')">Toggle Visibility</button><br><button>Go</button></form>

Options

AttributeOptionsDefaultDescription
visible-nullSet the value to visible (plain text)
confirm-targetstringnullThe ID of another field to match

History

  • v0.2 Jan 9, 2024
    • re-release as fully native web-component
  • v0.1 Feb 5, 2014
    • initial release

License

MIT License

About

custom-element (web component). password field with a toggle visiblity switch to hide/show the password value.

Topics

Resources

Stars

Watchers

Forks

Sponsor this project

 

[8]ページ先頭

©2009-2025 Movatter.jp