Gathering detailed insights and metrics for vue-phone-number-input
Gathering detailed insights and metrics for vue-phone-number-input
Gathering detailed insights and metrics for vue-phone-number-input
Gathering detailed insights and metrics for vue-phone-number-input
react-phone-number-input
Telephone number input React component
libphonenumber-js
A simpler (and smaller) rewrite of Google Android's libphonenumber library in javascript
react-native-phone-number-input
Phone Number Input Component
react-phone-input-2
A react component to format phone numbers
npm install vue-phone-number-input
63.3
Supply Chain
91.6
Quality
70.3
Maintenance
50
Vulnerability
95.8
License
1.1.9: Sync input & loader color
Published on 27 Apr 2020
1.1.8: auto-reconize country code and national number from number prefixed && support new version of libphonenumber-js
Published on 27 Apr 2020
1.1.7: fix(country iso code) issue with update programmatically
Published on 12 Apr 2020
Fix: Dark color management
Published on 14 Feb 2020
1.1.5: Bug fix search feature of country selector
Published on 10 Feb 2020
1.1.2: Fix form submit when you choose a country
Published on 06 Jan 2020
Module System
Min. Node Version
Typescript Support
Node Version
NPM Version
609 Stars
184 Commits
153 Forks
9 Watching
22 Branches
6 Contributors
Updated on 25 Nov 2024
Minified
Minified + Gzipped
Vue (56.85%)
CSS (21.21%)
JavaScript (19.97%)
SCSS (1.36%)
HTML (0.6%)
Cumulative downloads
Total Downloads
Last day
0.3%
3,547
Compared to previous day
Last week
9.8%
17,040
Compared to previous week
Last month
12%
71,840
Compared to previous month
Last year
-6.8%
793,512
Compared to previous year
A beautiful text field to format phone numbers made with VueJS
The version for Vue 2 is available here: maz-ui v2.x - MazPhoneNumberInput
The version for Vue 3 is available here: maz-ui v3.x - MazPhoneNumberInput
yarn add vue-phone-number-input
npm i --save vue-phone-number-input
1import VuePhoneNumberInput from 'vue-phone-number-input'; 2import 'vue-phone-number-input/dist/vue-phone-number-input.css'; 3 4Vue.component('vue-phone-number-input', VuePhoneNumberInput);
1<VuePhoneNumberInput v-model="yourValue" />
1<VuePhoneNumberInput v-model="yourValue" /> 2 3<script src="https://unpkg.com/vue" charset="utf-8"></script> 4<script src="./dist/vue-phone-number-input.umd.min.js" charset="utf-8"></script> 5<link rel="stylesheet" type="text/css" href="./dist/vue-phone-number-input.css"> 6 7<script type="text/javascript"> 8 Vue.component('vue-phone-number-input', window.VuePhoneNumberInput.default); 9</script>
preferred-countries
, ignored-countries
or have only-countries
valid-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
propssize="sm|lg"
disabled
prop)dark
prop)clearable
(cf: VueInputUi options)loader
(cf: VueInputUi options)Props | Type | Required | Default |
---|---|---|---|
v-model | String/Int | true | - |
id | String | false | VuePhoneNumberInput |
color | String HEX | no | dogderblue |
valid-color | String HEX | no | yellowgreen |
error-color | String HEX | no | orangered |
size | String `sm | lg` | no |
default-country-code (1) | String | no | null |
preferred-countries (2) | Array<string> | no | null |
ignored-countries | Array<string> | no | null |
only-countries | Array<string> | no | null |
no-validator-state | Boolean | no | false |
no-flags | Boolean | no | false |
disabled | Boolean | no | false |
dark | Boolean | no | false |
dark-color | String (hex) | no | #424242 |
required | Boolean | no | false |
error | Boolean | no | false |
clearable | Boolean | no | false |
loader (3) | Boolean | no | false |
translations (4) | Object | no | null |
countries-height (5) | Number | no | 30 |
no-use-browser-locale (6) | Boolean | no | false |
fetch-country (7) | Boolean | no | false |
no-country-selector (8) | Boolean | no | false |
border-radius | Number | no | 4 |
show-code-on-list | Boolean | no | false |
no-example | Boolean | no | false |
(1) Ex : default-country-code="FR"
(2) Ex : preferred-countries="['FR', 'BE', 'DE']"
This countries will be at the top of the list
(3) Loader progress bar has the input color (color
props)
(4) translations comes to replace default texts - Ex :
1translations="{ 2 countrySelectorLabel: 'Code pays', 3 countrySelectorError: 'Choisir un pays', 4 phoneNumberLabel: 'Numéro de téléphone', 5 example: 'Exemple :' 6}"
(5) height in px of the rows included in the dropdown. Ex: countries-height: 40
(6) By default the component get country code via browser - No network needed but not work on SSR with NuxtJS (disable it with no-use-browser-locale
)
(7) Fetch country code via https://ip2c.org/s - Network needed - (Do not use it with default-country-code
options)
(8) The country selector is not shown, you can validate your phone number with the country code set
Event | Return |
---|---|
phone-number-focused | - (emit when phone number input is focused) |
phone-number-blur | - (emit when phone number input is blur) |
input | AsYouType value (emit when new value is enter on phone number input && when a country is choosed) |
update | All values (cf values in table on demo) (emit when new value is enter on phone number input && when a country is choosed) |
Props | Action |
---|---|
ArrowDown | Navigation down in countries list |
ArrowUp | Navigation up in countries list |
Escape | Close countries list |
All letters characters | Searching country name in countries list (should be open) |
Slot | Action |
---|---|
arrow | Override the default arrow character for toggling the list of countries |
1npm install
1npm run serve
1npm run lint
This project is licensed under MIT License
No vulnerabilities found.
Reason
no binaries found in the repo
Reason
license file detected
Details
Reason
Found 0/30 approved changesets -- score normalized to 0
Reason
0 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 0
Reason
no effort to earn an OpenSSF best practices badge detected
Reason
security policy file not detected
Details
Reason
project is not fuzzed
Details
Reason
branch protection not enabled on development/release branches
Details
Reason
SAST tool is not run on all commits -- score normalized to 0
Details
Reason
63 existing vulnerabilities detected
Details
Score
Last Scanned on 2024-11-25
The Open Source Security Foundation is a cross-industry collaboration to improve the security of open source software (OSS). The Scorecard provides security health metrics for open source projects.
Learn More