Show / Hide Password
Show / Hide Password component adds said functionality to any password type input.
| Example | Code |
|---|---|
<as-show-hide-password>[input element]</as-show-hide-password> |
|
<as-show-hide-password labels="Vis,Skjul" icons="--as-icon-eye,--as-icon-eye-slash" event-prefix="as-show-hide">[input element]</as-show-hide-password> |
| Property name | Description | Type |
|---|---|---|
| labels | Optional: Coma separated list that defines button labels for show & hide states. Defaults are Show, Hide | string |
| icons | Optional: Coma separated list of CSS variable names of icons to be displayed instead of text labels. Text labels are instead used as aria-label values for the icons. Icon names order in the parameter is "show, hide" | string |
| Event name | Description | Example value |
|---|---|---|
| as-show-hide-password:show | Fires when password is shown. Has no detail object. | |
| as-show-hide-password:hide | Fires when password is hidden. Has no detail object. |