Purpose
Toggle a password input between type="password"
and type="text"
to allow the user to see what they have typed.
Action | Purpose |
---|
peak | Turn the password input into a text input |
hide | Turn the text input into a password input |
toggle | Toggle the input between password and text types |
Target | Purpose | Default |
---|
password | The password input to allow peeking on | - |
Value | Type | Description | Default |
---|
- | - | - | - |
Events
Event | When | Dispatched on | event.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'