Skip to content

ipa1981/vue-tel-input

 
 

Repository files navigation

vue-tel-input

International Telephone Input Boilerplate with Vue ((integrated with VueFormGenerator).

Checkout Demo at Codesandbox.

In-action GIF

Installation

npm install --save vue-tel-input

Usage

  • As a standalone component:
    Import vue-tel-input into your Vue component and use as a normal component:

    <template>
    ...
      <tel-input></tel-input>
    ...
    <template>
    <script>
    import TelInput from '../vue-tel-input'   
    export default {
      ...
      components: {
        TelInput
      }
    }
    </script>
  • As a field of VueFormGenerator

    1. Register vue-tel-input as a global component:

       import vueTelInput from "../vue-tel-input.vue";
       ...
       Vue.component("fieldTelephone", vueTelInput);

      !! As the naming convention for custom field in VueFormGenerator, you need to put the name of the component as: `field.

    2. Now you can you it in your schema:

      var schema: {
       fields: [{
         type: "telephone",
         label: "Phone Number",
         model: "phone"
       }]
      };

    For more info: vue-form-generator/custom-fields

Highlights & Credits

Example App Build Setup

npm install             # install dependencies
npm run dev             # serve with hot reload at localhost:8080
npm run build           # build for production with minification
npm run build --report  # build for production and view the bundle analyzer report
npm run unit            # run unit tests
npm test                # run all tests

made with ❤ by Steven.

About

International Telephone Input with Vue https://ry3wlvlxkn.codesandbox.io/

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • JavaScript 90.4%
  • Vue 9.0%
  • HTML 0.6%