0.2.5 • Published 8 years ago

react-country v0.2.5

Weekly downloads
3
License
MIT
Repository
github
Last release
8 years ago

react-country

DEPRECATED

react country help you search the country / city / country code / city code.

Now use the react-select to solve the style work.

Demo

Demo

Installation

You can install react-country component using the npm.

npm install react-country --save

Usage

  1. Require the react-country component

    var CountryList = require('react-country').CountryList;
  2. Start using it

    Raw js:

    React.createElement(CountryList)

    JSX:

    <CountryList />

Note

If you want to use the react-select style, please import the css in css/feault.css.

Or you can check the doc in react-select to get more info.

Callbacks

onChange

after you input the value, it return the country or city name you select.

Todo

  • customize theme
  • add country code search

Data source

https://restcountries.eu/

License

MIT @ctxhou