Actions

Password Reveal

Description

The Password Reveal Action allows you to toggle an input's input type between password and text allowing the user to see the password they are typing.

Usage

<script lang="ts">
    import { password_reveal, type PasswordRevealParameters } from 'action-archive';

    const passwordRevealParameters: PasswordRevealParameters = {
        target: '#password',
        type: 'toggle'
    };
</script>

<input type="password" id="password" />
<button use:password_reveal={passwordRevealParameters}>Reveal</button>

Example

API

Parameters

NameTypeDefaultDescription
targetHTMLInputElement | string-Input that will be toggled.
type'toggle' | 'hold''toggle'Type of reveal.
disabledbooleanfalseDisables the action.