react-country

0.2.5 • Public • Published

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

Package Sidebar

Install

npm i react-country

Weekly Downloads

5

Version

0.2.5

License

MIT

Last publish

Collaborators

  • ctxhou