1.0.7 • Published 2 years ago

global-country-state-city-select v1.0.7

Weekly downloads
-
License
MIT
Repository
github
Last release
2 years ago

Global Country State City Select

Basic library for Country, State and City with select inputs

Build Status

Basic library for Country, State and City with select inputs built with vue.js.

  • Input select with all countries around the world
  • Select for states of that country
  • Input select with option Cities belong to that state
  • Allow to customize it using props

Installation

CountryStateCitySelect requires Node.js to run.

Install the dependencies and devDependencies and start the server.

npm i global-country-state-city-select

Props

PropsTypeDefaultDescription
countryLabel , stateLabel , cityLabelStringChoose your { country , state , city }:Label to show above the select input.
countryBgColor , stateBgColor , cityBgColorStringdefaultBackground color of your input select with white text accept option { blue , red , green }.
countrySize , stateSize , citySizeStringdefault { 14px }Applying {padding , borderRadius , fontSize , lineHeight } of your input select and accept option {small , default , large }
countryRounded , stateRounded , cityRoundedBooleandefault { True }Applying { borderRadius of 60px } of your input select and accept option { true , false }

Usage Example

<global-country-state-city-select :countryLabel="new label form country select" :stateBgColor="blue"  :citySize="large" :countryRounded="false" />

How to import it in your vue app

In your main.js, or a similar entry point for your app:

import SelectCountryStateCity from "SelectCountryStateCity";
import Vue from "vue";
Vue.use(SelectCountryStateCity);

Plugins

CountryStateCitySelect is currently extended with the following plugins. Instructions on how to use them in your own application are linked below.

PluginREADME
Bilihttps://bili.egoist.sh
Rollup.jshttps://rollupjs.org/guide

License

MIT