Author: | neovav |
---|---|
Views Total: | 6,523 views |
Official Page: | Go to website |
Last Update: | July 20, 2021 |
License: | MIT |
Preview:

Description:
Just another telephone input mask JavaScript library that automatically formats telephone numbers typed in a tel
input field.
How to use it:
1. Download and import the phonemask library.
<script src="../src/phonemask.min.js"></script>
2. Initialize the phonemask library.
const cssPhone = 'input[name="phone"'; (new phoneMask()).init(cssPhone);
3. Create a tel input field and determine the mask format in the mask attribute:
<input type="tel" id="phone" name="phone" value="+1 (___) ___ - ____" mask="+1 (___) ___ - ____" placeholder="+1 (___) ___ - ____" />