Installations
npm install vue-country-code
Developer Guide
Typescript
No
Module System
CommonJS
Node Version
16.13.2
NPM Version
8.1.2
Releases
Unable to fetch releases
Contributors
Unable to fetch Contributors
Languages
CSS (81.05%)
JavaScript (9.7%)
Vue (8.83%)
HTML (0.41%)
Love this project? Help keep it running — sponsor us today! 🚀
Developer
Download Statistics
Total Downloads
379,187
Last Day
641
Last Week
2,190
Last Month
9,052
Last Year
133,570
GitHub Statistics
22 Stars
52 Commits
16 Forks
1 Watching
13 Branches
2 Contributors
Bundle Size
159.10 kB
Minified
90.04 kB
Minified + Gzipped
Package Meta Information
Latest Version
1.1.3
Package Id
vue-country-code@1.1.3
Unpacked Size
206.92 kB
Size
100.23 kB
File Count
4
NPM Version
8.1.2
Node Version
16.13.2
Total Downloads
Cumulative downloads
Total Downloads
379,187
Last day
40.9%
641
Compared to previous day
Last week
-7.6%
2,190
Compared to previous week
Last month
3%
9,052
Compared to previous month
Last year
26.1%
133,570
Compared to previous year
Daily Downloads
Weekly Downloads
Monthly Downloads
Yearly Downloads
Dev Dependencies
23
vue-country-code
Country Code Select with Vue.
Checkout Demo at Github pages.
Installation
- yarn:
1 yarn add vue-country-code
- npm:
1 npm i --save vue-country-code
Usage
-
Install as a global component:
1import Vue from "vue"; 2import VueCountryCode from "vue-country-code"; 3 4Vue.use(VueCountryCode);
-
In your component:
1<template> 2... 3 <vue-country-code 4 @onSelect="onSelect" 5 <!-- optional --> 6 :preferredCountries="['vn', 'us', 'gb']"> 7 </vue-country-code> 8... 9<template> 10<script> 11export default { 12 data() { 13 return { 14 }; 15 }, 16 methods: { 17 onSelect({name, iso2, dialCode}) { 18 console.log(name, iso2, dialCode); 19 }, 20 }, 21} 22</script>
-
Manual Trigger:
1<template> 2... 3 <vue-country-code 4 ref="vcc" 5 @onSelect="onSelect" 6 </vue-country-code> 7 <button @click="manualTrigger">Manual Trigger</button> 8... 9<template> 10<script> 11export default { 12data() { 13 return { 14 }; 15}, 16methods: { 17 onSelect({name, iso2, dialCode}) { 18 console.log(name, iso2, dialCode); 19 }, 20 manualTrigger() { 21 this.$refs.vcc.manualDropdown(); 22 } 23}, 24} 25</script>
Props
Property value | Type | Default value | Description |
---|---|---|---|
defaultCountry | string | '' | Default country, will override the country fetched from IP address of user |
disabledFetchingCountry | Boolean | false | Disable fetching current country based on IP address of user |
enabledCountryCode | Boolean | false | Enable country code in the input |
enabledFlags | Boolean | true | Enable flags in the input |
preferredCountries | Array | [] | Preferred countries list, will be on top of the dropdown. ie ['AU', 'BR'] |
onlyCountries | Array | [] | List of countries will be shown on the dropdown. ie ['AU', 'BR'] |
ignoredCountries | Array | [] | List of countries will NOT be shown on the dropdown. ie ['AU', 'BR'] |
dropdownOptions | Object | { disabledDialCode: false } | Options for dropdown, supporting disabledDialCode |
Events
Property value | Arguments | Description |
---|---|---|
onSelect | Object | Fires when the input changes with the argument is the object includes { name, iso2, dialCode } |
Highlights & Credits
- Forked from EducationLink/vue-tel-input.
- Vue app created by vue-cli.
- Telephone Number parsing, validation by libphonenumber-js.
- Country Codes data from intl-tel-input.
- Country Flags by behdad/region-flags.
- User's Location by get-json and ipifo.io
Demo Usage
1 2# install dependencies 3$ yarn/npm install 4 5# compile demo and start serve for development 6$ yarn/npm dev 7 8# build 9$ yarn/npm build 10
Made by Mon.
No vulnerabilities found.
Reason
no binaries found in the repo
Reason
license file detected
Details
- Info: project has a license file: LICENSE:0
- Info: FSF or OSI recognized license: MIT License: LICENSE:0
Reason
Found 2/7 approved changesets -- score normalized to 2
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
- Warn: no security policy file detected
- Warn: no security file to analyze
- Warn: no security file to analyze
- Warn: no security file to analyze
Reason
project is not fuzzed
Details
- Warn: no fuzzer integrations found
Reason
branch protection not enabled on development/release branches
Details
- Warn: branch protection not enabled for branch 'master'
Reason
SAST tool is not run on all commits -- score normalized to 0
Details
- Warn: 0 commits out of 25 are checked with a SAST tool
Reason
74 existing vulnerabilities detected
Details
- Warn: Project is vulnerable to: GHSA-67hx-6x53-jw92
- Warn: Project is vulnerable to: GHSA-v88g-cgmw-v5xw
- Warn: Project is vulnerable to: GHSA-whgm-jr23-g3j9
- Warn: Project is vulnerable to: GHSA-93q8-gq69-wqmw
- Warn: Project is vulnerable to: GHSA-fwr7-v2mv-hh25
- Warn: Project is vulnerable to: GHSA-qwcr-r2fm-qrc7
- Warn: Project is vulnerable to: GHSA-grv7-fg5c-xmjg
- Warn: Project is vulnerable to: GHSA-x9w5-v3q2-3rhw
- Warn: Project is vulnerable to: GHSA-pxg6-pf52-xh8x
- Warn: Project is vulnerable to: GHSA-3xgq-45jj-v275
- Warn: Project is vulnerable to: GHSA-gxpj-cx7g-858c
- Warn: Project is vulnerable to: GHSA-w573-4hg7-7wgq
- Warn: Project is vulnerable to: GHSA-phwq-j96m-2c2q
- Warn: Project is vulnerable to: GHSA-ghr5-ch3p-vcr6
- Warn: Project is vulnerable to: GHSA-434g-2637-qmqr
- Warn: Project is vulnerable to: GHSA-49q7-c7j4-3p7m
- Warn: Project is vulnerable to: GHSA-977x-g7h5-7qgw
- Warn: Project is vulnerable to: GHSA-f7q4-pwc6-w24p
- Warn: Project is vulnerable to: GHSA-fc9h-whq2-v747
- Warn: Project is vulnerable to: GHSA-6h5x-7c5m-7cr7
- Warn: Project is vulnerable to: GHSA-rv95-896h-c2vc
- Warn: Project is vulnerable to: GHSA-qw6h-vgh9-j6wx
- Warn: Project is vulnerable to: GHSA-pw2r-vq6v-hr8c
- Warn: Project is vulnerable to: GHSA-jchw-25xp-jwwc
- Warn: Project is vulnerable to: GHSA-cxjh-pqwp-8mfp
- Warn: Project is vulnerable to: GHSA-ww39-953v-wcq6
- Warn: Project is vulnerable to: GHSA-pfq8-rq6v-vf5m
- Warn: Project is vulnerable to: GHSA-c7qv-q95q-8v27
- Warn: Project is vulnerable to: GHSA-78xj-cgh5-2h22
- Warn: Project is vulnerable to: GHSA-2p57-rm9w-gvfp
- Warn: Project is vulnerable to: GHSA-7r28-3m3f-r2pr
- Warn: Project is vulnerable to: GHSA-r8j5-h5cx-65gg
- Warn: Project is vulnerable to: GHSA-896r-f27r-55mw
- Warn: Project is vulnerable to: GHSA-9c47-m6qq-7p4h
- Warn: Project is vulnerable to: GHSA-76p3-8jx3-jpfq
- Warn: Project is vulnerable to: GHSA-3rfm-jhwj-7488
- Warn: Project is vulnerable to: GHSA-hhq3-ff78-jv3g
- Warn: Project is vulnerable to: GHSA-952p-6rrq-rcjv
- Warn: Project is vulnerable to: GHSA-f8q6-p94x-37v3
- Warn: Project is vulnerable to: GHSA-xvch-5gv4-984h
- Warn: Project is vulnerable to: GHSA-5rrq-pxf6-6jx5
- Warn: Project is vulnerable to: GHSA-8fr3-hfg3-gpgp
- Warn: Project is vulnerable to: GHSA-gf8q-jrpm-jvxq
- Warn: Project is vulnerable to: GHSA-2r2c-g63r-vccr
- Warn: Project is vulnerable to: GHSA-cfm4-qjh2-4765
- Warn: Project is vulnerable to: GHSA-x4jg-mjrx-434g
- Warn: Project is vulnerable to: GHSA-rp65-9cf3-cjxr
- Warn: Project is vulnerable to: GHSA-9wv6-86v2-598j
- Warn: Project is vulnerable to: GHSA-rhx6-c78j-4q9w
- Warn: Project is vulnerable to: GHSA-566m-qj78-rww5
- Warn: Project is vulnerable to: GHSA-7fh5-64p2-3v2j
- Warn: Project is vulnerable to: GHSA-hwj9-h5mp-3pm3
- Warn: Project is vulnerable to: GHSA-p493-635q-r6gr
- Warn: Project is vulnerable to: GHSA-3965-hpx2-q597
- Warn: Project is vulnerable to: GHSA-hrpp-h998-j3pp
- Warn: Project is vulnerable to: GHSA-p8p7-x288-28g6
- Warn: Project is vulnerable to: GHSA-gcx4-mw62-g8wm
- Warn: Project is vulnerable to: GHSA-c2qf-rxjj-qqgw
- Warn: Project is vulnerable to: GHSA-m6fv-jmcg-4jfg
- Warn: Project is vulnerable to: GHSA-hxcc-f52p-wc94
- Warn: Project is vulnerable to: GHSA-cm22-4g7w-348p
- Warn: Project is vulnerable to: GHSA-g4rg-993r-mgx7
- Warn: Project is vulnerable to: GHSA-vx3p-948g-6vhq
- Warn: Project is vulnerable to: GHSA-4wf5-vphf-c2xc
- Warn: Project is vulnerable to: GHSA-72xf-g2v4-qvf3
- Warn: Project is vulnerable to: GHSA-rqff-837h-mm52
- Warn: Project is vulnerable to: GHSA-8v38-pw62-9cw2
- Warn: Project is vulnerable to: GHSA-hgjh-723h-mx2j
- Warn: Project is vulnerable to: GHSA-jf5r-8hm2-f872
- Warn: Project is vulnerable to: GHSA-5j4c-8p2g-v4jx
- Warn: Project is vulnerable to: GHSA-g3ch-rx76-35fx
- Warn: Project is vulnerable to: GHSA-wr3j-pwj9-hqq6
- Warn: Project is vulnerable to: GHSA-j8xg-fqg3-53r7
- Warn: Project is vulnerable to: GHSA-3h5v-q93c-6h6q
Score
2
/10
Last Scanned on 2025-02-03
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 MoreOther packages similar to vue-country-code
vue-country-code-select
Country Code Select with Vue
vue-country-intl
A vue-based mobile phone area code selection, nationality selection component(一个基于vue的手机区号选择、国籍选择组件)
vue-country-code-selector
这是一个结合vue框架的国际区号选择器,可以点击选择某一国家或地区的区号进行选择
vue-phone-country-code
A phone number input made with Vue JS && libphonenumber-js