Skip to content

Text mask

As-you-type input masking with unmasked model values.

@xngui/cdk/text-mask
@xngui/cdk/text-mask

Preview

Masked entry surfaces

Switch host surface and preset — model value stays unmasked. Use x-input or x-textarea for form-field chrome; native hosts use the xTextMask directive.

Raw model value:

Assistive:
TipSR
import { XTextMask } from '@xngui/cdk/text-mask';
 
<input
xTextMask
[xTextMask]="'phone'"
[xTextMaskRawValue]="rawValue()"
(xTextMaskChange)="onRawChange($event)"
inputmode="numeric"
>

Events

Interact with the preview — events will appear here.