Vue Input Mask
Getting started
First, install it.
npm i vue-text-mask --save
Then, use it as follows:
Phone Number
You could alternatively define the component globally:
Vue;
<masked-input>
is essentially a wrapped <input>
element - so it supports all the regular input properties (type, placeholder, class, etc). It is compatible with v-model 2-way binding, and is reactive to changes to any of the text mask props.
Documentation
For more information about the props
that you can pass to the component, see
the documentation here.
Example
To see an example of the code running, follow these steps:
- Clone the repo,
git clone git@github.com:text-mask/text-mask.git
npm install
npm run vue:dev
- Open http://localhost:3000
Contributing
We would love some contributions! Check out this document to get started.