Sign in
Use password manager autocomplete while allowing temporary visibility.
Components / Forms
A native password field with a localized visibility toggle.
npx @getweini/cli@latest add password-inputUse password manager autocomplete while allowing temporary visibility.
Show application-owned password guidance beside a new-password field.
<script setup lang="ts">
import { ref } from 'vue'
import PasswordInput from './components/ui/password-input/PasswordInput.vue'
const password = ref('')
const messages = { showPassword: 'Show password', hidePassword: 'Hide password' }
</script>
<template>
<label for="account-password">Password</label>
<PasswordInput
id="account-password"
v-model="password"
name="password"
autocomplete="current-password"
:messages="messages"
/>
</template>The visibility button keeps focus in the field.
<script setup lang="ts">
import { ref } from 'vue'
import PasswordInput from './components/ui/password-input/PasswordInput.vue'
const password = ref('')
const messages = { showPassword: 'Show password', hidePassword: 'Hide password' }
</script>
<template>
<label for="password">Password</label>
<PasswordInput id="password" v-model="password" name="password" autocomplete="current-password" :messages="messages" required />
</template>The application supplies its own password rules.
<script setup lang="ts">
import { ref } from 'vue'
import PasswordInput from './components/ui/password-input/PasswordInput.vue'
const password = ref('')
const messages = { showPassword: 'Show password', hidePassword: 'Hide password' }
</script>
<template>
<label for="new-password">New password</label>
<PasswordInput id="new-password" v-model="password" autocomplete="new-password" :messages="messages" aria-describedby="password-help" required />
<p id="password-help">Use at least 12 characters.</p>
</template>The most useful props, models, slots, events, and methods for this component.
| Name | Type | Default or requirement |
|---|---|---|
v-model | string | undefined | undefined |
messages | { showPassword; hidePassword } | required |
id | string | generated |
size | sm | md | lg | md |
invalid / disabled / readonly | boolean | false |
defaultVisible | boolean | false |
The native input handles validation, autocomplete, focus, and form submission. The trailing button changes visibility without moving focus. Connect your help and error text with aria-describedby.