Back
PasswordInput
Basic Usage
States
With Strength Meter
Enable ShowStrength for a zxcvbn-powered strength bar that scores passwords from 0 (Very Weak) to 4 (Strong).
With Requirements
Combine strength scoring with requirement checks for a complete password policy.
Custom Min Length
Set MinLength to require longer passwords.
Usage
A password field with a built-in visibility toggle powered by Alpine.js. Enable ShowStrength to add a zxcvbn-powered strength meter with configurable requirements.
@forms.PasswordInput(forms.PasswordInputProps{
Label: "Password",
Name: "password",
Placeholder: "Enter your password",
Required: true,
ShowStrength: true,
MinLength: 8, // default 8
RequireUppercase: true,
RequireLowercase: true,
RequireNumber: true,
RequireSpecial: true,
})