A Vuetify form control usable for phone numbers. Supports country code, auto formatting and country code recognition
npm install @kingscode/vuetify-phone-inputPlease refer to the
TextField
if you want to see which inherited props will be available.
| Name | Type | Default |
| ------------- |:-------------:| -----:|
| value|string| '' |
| countries|[]|countries|
| type|string|tel|
| placeholder|string|#|
| countryCode|string-number|''|
| prependCountryCode|boolean|true|
@country|string| The new selected country code |@phone|string| Equivalent to @change event, but with additional features. Gets called on blur |
npm i @kingscode/vuetify-phone-input
`
Then just import the component in the file you need it
`
import VuetifyPhoneInput from '@kingscode/vuetify-phone-input';
`
And add it to the components in your vue file
`
components: {
VuetifyPhoneInput,
...
`$3
`js
@country="onCountry"
@phone="onPhone"/>
`If the consumer enters the following:
+32612345678 when the current selected country does not match, the country will be adjusted accordingly.Remember that this Phone Input is derived from the
VTextField from Vuetify, meaning that you can still use the error-messages, or placeholder` attributes for example.