Marks a single input slot within a [cngxOtpInput] container
CngxOtpSlot
DirectivePrimaryv0.1.0WCAG AA
projects/forms/input/otp-input.directive.ts
Import#
import { CngxOtpSlot } from '@cngx/forms/input'
Description#
Marks a single input slot within a [cngxOtpInput] container.
@for (i of otp.indices(); track i) {
<input [cngxOtpSlot]="i" />
}Metadata#
Host#
Index#
Inputs
Derived State
Inputs#
HostBindings#
| Binding | Expression |
|---|---|
[attr.type] | inputAttrType() |
[attr.maxlength] | 1 |
[attr.autocomplete] | index() === 0 ? "one-time-code" : "off" |
[attr.inputmode] | inputMode() |
[attr.aria-label] | slotLabel() |
HostListeners#
| Event | Handler |
|---|---|
(input) | input() |
(keydown) | keydown() |
(paste) | paste() |
(focus) | focus() |