Password Input

A password input field with a toggle button to show or hide the entered text.

Install

npx @vultra/cli add password-input

Usage

<script>
  import { PasswordInput } from '@vultra/ui';

  let password = $state('');
</script>

<PasswordInput bind:value={password} placeholder="Enter password" />

Props

PropTypeDefaultDescription
valuestringCurrent password value
placeholderstring-Input placeholder
disabledbooleanfalseDisable input
classstring-Additional CSS classes

Events

EventDetailDescription
changestringFires when value changes

Notes

  • Toggle button switches between type="password" and type="text".
  • Use eye/eye-off icons in the toggle for clear affordance.