Conforms string to given mask or pattern, and can be hooked up to input element
npm install text-mask-all
Text Mask let's you turn a plain , into one that conforms
any user input, as they type, to a given mask pattern.
To see Text Mask in action, checkout the demo page.
* React
* Angular 2
* Vanilla JS
IE9+, Android, Samsung Internet, Windows Phone, iOS, Opera, Firefox, Safari, and Chrome
Character | Description
--- | ---1 | Any numberA | Any letter? | Any number or letterU | Any letter (will be transformed to uppercase)L | Any letter (will be transformed to lowercase)
#### Escapable masking characters
The mask also supports escaping, so you can use a masking character within the mask. For example
``bash`
+\1 (111) 111-1111
The first 1 is not a masking character but part of the mask. For more information, see the
documentation here.

Guide mode prints out placeholder characters and the mask itself as the user types

No-guide mode doesn't print out placeholder characters and only adds mask characters when the
user reaches them
You can change the placeholder character from _ (underscore) to anything you want. For example,U+2000
you can use the unicode character (\u2000 in JavaScript), which is white space to
create a mask for phone number that looks like
+1 ( ) -
Or for date
/ / `
* Accepts custom validator
* Supports pasting
* Supports browser auto-fill
It is small, around 3KB* gzipped
* Has no dependencies
Please
file an issue or
tweet at me.
Public domain - CC0 1.0 Universal