A single component for one-time passwords, PIN entry, and segmented license keys. Same API covers [1,1,1,1,1,1] classic OTP and non-uniform layouts like MS Office's [6,6,4,4,6,6].
Default layout. Template-driven binding via [(ngModel)]. The (complete) event fires once when all 6 boxes are filled — wire it to auto-submit. SMS autofill works on iOS / Android (the hidden input has autocomplete="one-time-code").
[groups]="[1,1,1,1]" with type="password". The most-recently typed character is visible for 700 ms then masks to •. Paste never reveals.
Current value (for demo):
[groups]="[6,6,4,4,6,6]", type="alphanumeric", case="upper". Paste a string with separators (e.g. "AB1234-CD5678-EF12-GH34-IJ5678-KL9012") — the component strips the dashes and fills correctly.
Current value:
[groups]="[5,5,5,5,5]", type="alphanumeric".
Current value:
Bound to a FormControl with Validators.required and Validators.minLength(6). The red border appears once the field is touched and the value is still invalid — mirrors Bootstrap's .is-invalid convention.
Status: INVALID · Touched: false · Value: