Password
A password field with show / hide, a strength meter and a clear button.
Basic
A masked field bound with ngModel. autocomplete="current-password" by default, so password managers fill it.
Toggle mask
toggleMask adds a button that shows or hides the text. It is a toggle button (aria-pressed), reachable with Tab.
Meter
feedback opens a strength meter under the field while it has focus; (strengthChange) reports the level. Use autocomplete="new-password" on sign-up forms.
Strength: —
Custom rules
Own rules and texts: mediumRegex, strongRegex and the labels for each level.
Requirements
<ng-template txPasswordContent> adds content under the meter — here a live requirements list. Header and footer templates work the same way.
Clear
showClear adds a clear button while there is text.
Float label
Works inside tx-float-label — give it an inputId.
Sizes
small, medium and large; variant="filled" like every field.
States
disabled, readonly and invalid.
Form
A sign-up form with tx-field: required, minimum length and a matching confirmation.
Design tokens
[dt] changes the password tokens — here a thicker meter with own colours.