Password
A password-manager friendly native control with accessible visibility, strength feedback, Caps Lock awareness and one value contract across Angular Forms.
GET STARTED
Import
Import the canonical standalone control from its granular entry point.
Current password
current-password is the safe default. Visibility changes input type without disabling autofill or password managers.
New password and feedback
The four-step score is a presentational hint—not a validator or server security policy.
Angular Forms
The same component works with template-driven, reactive and Signal Forms without a second API.
ngModel
Reactive Form
Signal Form
States and constraints
Native length, required, readonly and disabled semantics compose with form-driven invalid, pending, touched and dirty state.
Unstyled and typed classes
Native semantics and structural hooks remain while Tailwind owns every visible choice.
ACCESSIBILITY
Secure native semantics
The control keeps native password behavior and gives every supplemental state an accessible channel.
Native input and autofill
The input starts as type=password and preserves name, autocomplete, required, minlength and maxlength. NeuralNg never blocks password managers or paste.
Visibility and announcements
The toggle is a labelled native button with localized show/hide text. Strength and Caps Lock feedback remain textual rather than color-only.
Security guidance
Strength scoring is only interface feedback. Enforce password policy in Angular validation and again on the server; never log or include password values in analytics.
API
Public contract
Inputs and models
| Name | Type | Default | Purpose |
|---|---|---|---|
| value | model<string> | '' | Password value shared by Signals and Angular Forms. |
| visible | model<boolean> | false | Current plain-text visibility state. |
| toggleVisibility | boolean | true | Shows the accessible visibility control. |
| showFeedback | boolean | false | Renders the deterministic strength meter and label. |
| disabled | boolean | false | Disables input and visibility control. |
| readonly | boolean | false | Keeps value focusable without allowing edits. |
| required | boolean | false | Applies native required semantics. |
| invalid | boolean | false | Exposes invalid visual and ARIA state. |
| pending | boolean | false | Exposes asynchronous validation state. |
| touched | boolean | false | Form interaction state. |
| dirty | boolean | false | Form modification state. |
| minLength | number | undefined | undefined | Native minimum length constraint. |
| maxLength | number | undefined | undefined | Native maximum length constraint. |
| name | string | '' | Native form and password-manager field name. |
| autocomplete | string | current-password | Native password-manager autocomplete purpose. |
| inputMode | string | '' | Native virtual keyboard hint. |
| placeholder | string | '' | Input placeholder. |
| ariaLabel | string | '' | Accessible input name when no external label exists. |
| passwordId | string | generated | Native input ID. |
| showIconClass | string | nt-eye | Icon used while the value is hidden. |
| hideIconClass | string | nt-eye-off | Icon used while the value is visible. |
| showPasswordLabel | string | locale | Visibility control label. |
| hidePasswordLabel | string | locale | Hide control label. |
| weakLabel / mediumLabel / strongLabel | string | locale | Component strength-label overrides. |
| capsLockMessage | string | locale | Caps Lock warning override. |
| fluid | boolean | false | Fills the available inline size. |
| unstyled | boolean | false | Removes visual base classes. |
| passwordClass / inputClass | string | '' | Additive root and native-input classes. |
| classes | NeuralPasswordClasses | {} | Typed additive internal classes. |
Events
valueChangestringImplicit model output.
visibleChangebooleanImplicit visibility model output.
visibilityChangebooleanSemantic user visibility event.
strengthChangeNeuralPasswordStrengthChangeValue, score and presentation strength.
touchvoidFirst blur/touch interaction.
capsLockChangebooleanImplicit Caps Lock model output.
Methods
focus(options?)Focuses the native password input.
select()Selects the complete native value.
reset(value?)Resets value and interaction state.
Typed class slots
rootComponent root.
inputGroupInput and toggle frame.
inputNative password input.
toggleVisibility button.
toggleIconVisibility Neural icon.
feedbackStrength feedback wrapper.
meterStrength meter track.
meterBarStrength meter fill.
strengthLabelLocalized strength text.
capsLockCaps Lock message.
DESIGN TOKENS
Password tokens
Every token is verified against the shipped Neutral theme and component CSS.
--neural-password-widthPassword inline size.
--neural-password-input-widthPassword input inline size.
--neural-password-min-heightPassword minimum block size.
--neural-password-paddingPassword internal spacing.
--neural-password-colorPassword foreground color.
--neural-password-color-readonlyReadonly password foreground color.
--neural-password-caret-colorPassword text caret color.
--neural-password-backgroundPassword background surface.
--neural-password-borderPassword border shorthand.
--neural-password-border-color-focusFocused password border color.
--neural-password-border-color-invalidInvalid password border color.
--neural-password-radiusPassword corner radius.
--neural-password-shadowPassword box shadow.
--neural-password-shadow-focusFocused password box shadow.
--neural-password-shadow-invalidInvalid password box shadow.
--neural-password-focus-ringPassword keyboard focus ring.
--neural-password-focus-ring-offsetPassword focus ring offset.
--neural-password-placeholder-colorPassword placeholder foreground color.
--neural-password-placeholder-opacityPassword placeholder opacity.
--neural-password-toggle-sizePassword toggle width and height.
--neural-password-toggle-colorPassword toggle foreground color.
--neural-password-toggle-color-hoverHovered password toggle foreground color.
--neural-password-toggle-backgroundPassword toggle background surface.
--neural-password-toggle-background-hoverHovered password toggle background surface.
--neural-password-meter-backgroundPassword meter background surface.
--neural-password-meter-heightPassword meter block size.
--neural-password-meter-radiusPassword meter corner radius.
--neural-password-strength-weakIndicator color used for a weak password score.
--neural-password-strength-mediumIndicator color used for a medium password score.
--neural-password-strength-strongIndicator color used for a strong password score.
--neural-password-message-colorPassword message foreground color.
--neural-password-message-font-sizePassword message font size.
--neural-password-disabled-opacityPassword disabled opacity.
--neural-password-transitionPassword CSS transition.
--neural-password-meter-transitionPassword meter CSS transition.