<tap-pin-code>
PIN / OTP (One-Time Password) code input component. A segmented fixed-length character input designed for mobile devices, supporting SMS verification codes, 2FA tokens, and payment PINs, with native touch input, SMS autofill, and masking.
Example
Loading...
<tap-pin-code .length=${6} @change=${(evt) => (evt.target.value = evt.detail)}></tap-pin-code> <tap-pin-code
.length=${4}
.mask=${true}
@change=${(evt) => (evt.target.value = evt.detail)}></tap-pin-code> <tap-pin-code
.length=${6}
.variant=${"joint"}
.mask=${true}
@change=${(evt) => (evt.target.value = evt.detail)}></tap-pin-code> <tap-pin-code
.length=${4}
.variant=${"underline"}
@change=${(evt) => (evt.target.value = evt.detail)}></tap-pin-code> <tap-pin-code
.length=${4}
.error=${true}
.value=${"1234"}></tap-pin-code> <tap-pin-code
.length=${4}
.disabled=${true}
.value=${"12"}></tap-pin-code>
API
Shadow DOM; Extends GemElement
Instance Properties
| Property(Attribute) | Reactive | Type |
|---|---|---|
change |
Emitter<string> |
|
submit |
Emitter<string> |
|
value(value) |
Yes | string |
type(type) |
Yes | 'number' | 'alphanumeric' | 'text' |
variant(variant) |
Yes | 'box' | 'underline' | 'joint' |
mask(mask) |
Yes | string |
placeholder(placeholder) |
Yes | string |
length(length) |
Yes | number |
autofocus(autofocus) |
Yes | boolean |
disabled(disabled) |
Yes | boolean |
readonly(readonly) |
Yes | boolean |
error(error) |
Yes | boolean |
disableAutocommit(disable-autocommit) |
Yes | boolean |
Instance Methods
| Method | Type |
|---|---|
focus |
(options?: FocusOptions) => void |
blur |
() => void |
clear |
() => void |
Other
| Type | Value |
|---|---|
| Event | change, submit |
| Part | cell, active-cell, input, dot, caret |
