vue3-phone-number-input
vue3-phone-number-input
International Phone Number Input with Country Code.
Getting started
Install the plugin:
-
With npm
npm install vue3-phone-number-input -
With yarn
yarn add vue3-phone-number-input -
Add the plugin into your app:
import { createApp } from 'vue' import App from './App.vue' import Vu3PhoneNumberInput from 'vue3-phone-number-input' import 'vue3-phone-number-input/dist/vue3-phone-number-input.css'; const app = createApp(App) .mount('#app') app.use(Vu3PhoneNumberInput)
Available options
app.use(Vu3PhoneNumberInput, {
placeholder: '11 111 11 11',
countryPlaceholder: 'Search',
countryLebel: 'Select Country',
})
- Use the
PhoneNumberWithCountryCodecomponent:
<template>
<PhoneNumberWithCountryCode
v-model:phone_number="form.phone_number"
v-model:country_code="form.country_code"
/>
</template>
<script>
import { reactive } from '@vue/reactivity'
export default {
name: 'App',
setup() {
const form = reactive({
phone_number: '',
country_code: ''
})
return {
form
}
},
}
</script>
Available props
<template>
<PhoneNumberWithCountryCode
v-model:phone_number="form.phone_number"
v-model:country_code="form.country_code"
placeholder="11 111 11 11"
country-placeholder="Search"
country-lebel="Select Country"
/>
</template>
Related Packages
Version History
| Version | Released | Vue | License |
|---|---|---|---|
| 1.1.2 | ^3.2.13 | MIT | |
| 1.1.1 | ^3.2.13 | MIT | |
| 1.1.0 | ^3.2.13 | MIT | |
| 1.0.9 | ^3.2.13 | MIT | |
| 1.0.8 | ^3.2.13 | MIT | |
| 1.0.7 | ^3.2.13 | MIT | |
| 1.0.6 | ^3.2.13 | MIT | |
| 1.0.5 | ^3.2.13 | MIT | |
| 0.1.4 | ^3.2.13 | MIT | |
| 0.1.3 | ^3.2.13 | MIT | |
| 0.1.2 | ^3.2.13 | MIT | |
| 0.1.1 | ^3.2.13 | MIT | |
| 0.1.0 | ^3.2.13 | MIT |