18
FebMazPhoneNumberInput is a standalone input component made with Vue Js which helps the user to enter a phone number and validate it according to the country. You can visit its demo here.
It has many amazing features given below:
preferred-countries
, ignored-countries
or have only-countriesvalid-color
option) when the phone number is valid (can be disabled by no-validator-state
attr)no-use-browser-locale
) or you can use fetch-country
to get the country code via https://ip2c.org/s (network needed) - you can use default-country-code
option instead to set oneno-flags
propsYou can install this component via Npm or Yarn:
yarn
yarn add vue-phone-number-input
npm
npm i --save vue-phone-number-input
ES6 Modules / CommonJS
import VuePhoneNumberInput from 'vue-phone-number-input';
import 'vue-phone-number-input/dist/vue-phone-number-input.css';
Vue.component('vue-phone-number-input', VuePhoneNumberInput);
<VuePhoneNumberInput v-model="yourValue" />
UMD
<VuePhoneNumberInput v-model="yourValue" />
<script src="https://unpkg.com/vue" charset="utf-8"></script>
<script src="./dist/vue-phone-number-input.umd.min.js" charset="utf-8"></script>
<link rel="stylesheet" type="text/css" href="./dist/vue-phone-number-input.css">
<script type="text/javascript">
Vue.component('vue-phone-number-input', window.VuePhoneNumberInput.default);
</script>
size=“sm|lg”
disabled
prop)dark
prop)clearable
(cf: VueInputUi options)loader
(cf: VueInputUi options)For more details & source code, you can visit the documentation on Github.
Published at : 18-02-2022
I am a highly results-driven professional with 12+ years of collective experience in the grounds of web application development especially in laravel, native android application development in java, and desktop application development in the dot net framework. Now managing a team of expert developers at Codebrisk.
Launch project