0.0.3 • Published 3 years ago

vue-international-phone-input v0.0.3

Weekly downloads
5
License
MIT
Repository
github
Last release
3 years ago

vue-international-phone-input

A Vue component for entering and validating international telephone numbers.

Usage

Install the dependency by using yarn

yarn add vue-international-phone-input

or npm

npm i --save vue-international-phone-input

Import the component similar to this example:

<template>
  <div>
    <InternationalPhoneInput
      v-model="phoneNumber"
      label="Phone number"
      placeholder="enter phone number"
    />
  </div>
</template>

<script>
import InternationalPhoneInput from 'vue-international-phone-input';
export default {
  components: {
    InternationalPhoneInput,
    // ....
  },
  data: () => ({
    phoneNumber: '',
    //...
  }),
};
</script>

API

Props

PropsTypeRequiredDefault
valueStringfalse''
labelStringfalse''
placeholderStringfalse''

Events

EventReturn
inputemit new value when it is entered in phone input

Contributing

After checking out the code make sure you install all the dependencies by running

yarn

To run a local dev server with hot-reloads do

yarn serve

License

This project is licensed under MITLicense