Skip to main content

PasswordPeekController

Purpose​

Toggle a password input between type="password" and type="text" to allow the user to see what they have typed.

Actions​

ActionPurpose
peakTurn the password input into a text input
hideTurn the text input into a password input
toggleToggle the input between password and text types

Targets​

TargetPurposeDefault
passwordThe password input to allow peeking on-

Classes​

ClassPurposeDefault
---

Values​

ValueTypeDescriptionDefault
----

Events​

EventWhenDispatched onevent.detail
----

Side Effects​

None

How to Use​

Within a wrapper that loads the controller, add an input[type="password"] with a data-password-peek-target='password' and an adjacent button/link with data-password-peek-target='button'