# KptPassword (kpt-password) A password field with a visibility toggle and an optional strength meter. Signal Forms. Import: `import { KptPassword } from '@konce-pt/angular';` ## Inputs / model - `value`: model (or `formField`) - `feedback`: boolean - shows the strength meter (4 bars + a label) - `placeholder`: string - `id`: string|null - the id of the native field (the host never carries it); generated when absent - `autocomplete`: string | null = 'current-password' - in sign-up and reset flows set it to `new-password`, otherwise the password manager fills in the old password instead of proposing a new one - `disabled`/`invalid`/`touched`: boolean; `touch`: output ## Password strength A 0-4 score. The score follows length first, not composition rules (NIST SP 800-63B advises against them): an approximate entropy over the character classes actually used, cut for repeats (`aaaa`), sequences (`abcd`, `1234`, `qwerty`) and the "Word + digits + symbol" shape. `Password1!` is weak, thirty lowercase letters are strong, and `ą`/`ż` are letters, not special characters. There is no dictionary - it is a hint, not a security control. Colors: danger->warning->info->success. ## Example ## Label and description `id` goes to the native field - the host never carries it; without one it is generated. Inside `kpt-form-field` the control links itself: the wrapper's `label[for]` points at it and the hint or error is added to `aria-describedby`, so `controlId` is not needed. Without a wrapper, name it with `ariaLabel`. The host no longer carries the `id` (it used to, so `label[for]` pointed at `kpt-password` and the same id existed twice). New: `ariaLabel`, `required`, `readonly`/`readOnly`, `aria-invalid` after touch; with `feedback` the strength label is added to `aria-describedby`. ## Motion The strength meter fades in when the first character appears; lit segments fill from the start in a wave and empty from the end when the score drops, in the colour of the current score; the score label enters anew on every change. Turning invalid (after touch) flashes an error ring and shakes the field - inside an invalid `kpt-form-field` only the ring, because the wrapper shakes. Follows `enter` from `provideKptMotion` (`spring` / `fade` / `none`); nothing moves on first render; `enabled: false` and the system "reduce motion" setting always win. ## Tokens The field `--kpt-form-field-*`; the meter bars `--kpt-color-{danger,warning,info,success}`.