Skip to content

sunviwo/react-country-flag-currency-picker

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

react-country-flag-currency-picker

A customizable svg flags,currency select components for React Js.

Installation

The package can be installed via NPM:

npm install react-country-flag-currency-picker --save

Usage

    <ReactCountryFlagsCurrencySelect />

Default Country

You can select a default country to be rendered.

    <ReactCountryFlagsCurrencySelect
    defaultCountry="US" />

Searchable

You can enable search filter using prop searchable.

    <ReactCountryFlagsCurrencySelect
    searchable={true} />

Search Placeholder

You can set the placeholder text for search using prop searchPlaceholder.

    <ReactCountryFlagsCurrencySelect
    searchable={true}
    searchPlaceholder="Search for a country" />

onSelect

You can use onSelect event handler which fires each time an option is selected. onSelect(countryCode).

    //onSelect Method
    onSelectFlag(country){
        console.log(country)
    }
    
    //component render
    <ReactCountryFlagsCurrencySelect
    defaultCountry="US"
    onSelect={this.onSelectFlag} />

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • JavaScript 96.8%
  • CSS 3.2%