Getting Started
Overview
Installation
Theme
Forms
Basic Inputs
Select
Custom Inputs
Components
Navigation
Components
69
Micro Charts
Libraries
Kanban Board
Image Designer
Video Player
Visual Builder
Content Editor
Data View
Latest npm version of @ngstarter-ui/componentsWeekly npm downloads of @ngstarter-ui/components
Purchase

Password Strength

Password Strength provides real-time feedback while a user creates or changes a password. It shows a strength bar and can show detailed requirement status for length, lowercase, uppercase, digit, special character, and custom rules.

Use it next to a password input in signup, reset password, change password, account security, and credential setup forms.

Use ngs-pass-toggle-visibility as a form-field suffix when users need to show or hide the password. Use PasswordStrengthInfo when the form should explain exactly which requirements are satisfied.

Do not use Password Strength for OTP, MFA, invite codes, or passcodes; use PinInput. Do not use it for generic text validation. Do not rely on it as the only password security policy; the backend must validate the password too.

Key Features:
  • Real-time Feedback: Instantly updates the strength bar as the user types.
  • Configurable Rules: Easily enable or disable rules for length, digits, special characters, etc.
  • Detailed Info: Use the PasswordStrengthInfo component to display specific requirement status.
  • Visibility Toggle: Includes a helper component for toggling password visibility.

PasswordStrength

PropTypeDefault
password*
The password value to check strength for
any
externalError
External error state
booleanfalse
enableLengthRule
Whether to enable length rule
booleantrue
enableLowerCaseLetterRule
Whether to enable lower case letter rule
booleantrue
enableUpperCaseLetterRule
Whether to enable upper case letter rule
booleantrue
enableDigitRule
Whether to enable digit rule
booleantrue
enableSpecialCharRule
Whether to enable special character rule
booleantrue
min
Minimum number of characters
number8
max
Maximum number of characters
number30
customValidator
Custom validator RegExp
RegExp
warnThreshold
Threshold for warning state
number21
accentThreshold
Threshold for accent state
number81
EventDescription
strengthChangedEmitted when password strength changes

PasswordStrengthInfo

PropTypeDefault
passwordComponent*
Reference to the PasswordStrength component
PasswordStrength
enableScoreInfo
Whether to show score info
booleanfalse
lowerCaseCriteriaMessage
Message for lower case criteria
stringcontains at least one lower character
upperCaseCriteriaMessage
Message for upper case criteria
stringcontains at least one upper character
digitsCriteriaMessage
Message for digits criteria
stringcontains at least one digit character
specialCharsCriteriaMessage
Message for special characters criteria
stringcontains at least one special character
customCharsCriteriaMessage
Message for custom characters criteria
stringcontains at least one custom character
minCharsCriteriaMessage
Message for minimum characters criteria
stringcontains at least minimum characters
ngsIconDone
Icon for done state
stringcheckmark-24-regular
ngsIconError
Icon for error state
stringerror-circle-24-regular

PassToggleVisibility

PropTypeDefault
visible
Initial visibility state
booleanfalse
tabindex
Tabindex for the toggle button
string''