Props
Vue Simple Phone has the following props
region
The default region country code to use.
- Type:
String
aISO 3166-1
country code - Default:
US
<VueSimplePhone region="CN"/>
language
The display language for the country names.
- Type:
Intl.LocalesArgument
- Default:
['zh-Hant']
<VueSimplePhone :language="['zh-Hant']"/>
value
The starting value to use.
- Type:
String
- Default:
undefined
<VueSimplePhone value="2345678901"/>
placeholder
The placeholder to use instead of the default.
- Type:
String
- Default: the example phone number from each country
<VueSimplePhone placeholder="(555) 000-0000"/>
countries
The list of countries to display in the dropdown as ISO 3166-1
codes
- Type:
String[]
- Default:
country-flag-icons
's list of countries
<VueSimplePhone :countries="['US', 'CN', 'FI', 'SE', 'MX', 'JP']"/>
disabled
Whether the input can be interacted with or not.
- Type:
Boolean
- Default:
true
<VueSimplePhone :disabled="true"/>
displayFlags
Whether or not to display flags.
- Type:
Boolean
- Default:
true
<VueSimplePhone :displayFlags="false"/>
autocomplete
Whether or not to enable autocomplete for the country selector.
- Type:
Boolean
- Default:
true
<VueSimplePhone :autocomplete="false"/>
disableAutocompleteProcessing
Controls how the autocomplete input behaves. When set to true, the input functions like a standard text field, allowing character-by-character editing (e.g., backspace removes only the last character instead of clearing the entire query).
- Type:
Boolean
- Default:
false
<VueSimplePhone :disableAutocompleteProcessing="true"/>
phoneNumberType
The type of phone number example to give to the user.
- Type:
PhoneNumberTypes
- Default:
undefined
<VueSimplePhone phoneNumberType="toll-free"/>
opened
Whether or not the dropdown is open, note that it is not closeable, unless you change the value.
- Type:
Boolean
- Default:
undefined
<VueSimplePhone :opened="true"/>
Missing Something?
Create an issue
on our GitHub! We very well may be able to add your feature.