Skip to content

syntacticsolutions/Vue-Country-Region-Dropdown

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Getting Started

  1. npm install vue-country-region-dropdown

  2. import Vue from 'vue'

  3. import VueCountryRegion from 'vue-country-region-dropdown'

  4. Vue.use(VueCountryRegion)

Country Dropdown

  1. Usage:
<template>
    <v-country-dropdown
        :blacklist="blacklist"
        placeholder="Select a Country"
        :value="billing_country"
        v-model="billing_country" />
</template>
<script>
    export default {
        data: () => ({
            billing_country: 'US',
            blacklist: ['A', 'AF', 'RU']
        })
    }
</script>
  1. Props:

blacklist: (optional) an array of country shortcodes that should be omitted from the dropdown

value: (optional)the country shortcode that belongs to the value that should be shown on mounted

Region Dropdown

  1. Usage:
<template>
    <v-region-dropdown
        :country="billing_country"
        v-model="billing_state"
        :value="billing_state"
        placeholder="Select a Region"/>
</template>
<script>
export default {
    data: () => ({
        billing_state: 'CA',
        billing_country: 'US'
    })
}
<script>
  1. Props:

country: The country code from v-country-dropdown value: (optional) the region shortcode of a region to be shown on load

About

A Vue dropdown selector for countries and regions

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published