react_countries_picker
v0.0.8
Published
A country selector component with flags
Downloads
6
Maintainers
Readme
Country Selector Library
A reusable React component for selecting countries, complete with country flags and dial codes.
Features
- Select countries with flags
- Displays dial codes
- Easy integration into any React project
Installation
Install the package via npm:
npm install react_countries_picker
Usage/Examples
import React from "react";
import CountryPicker from "react_countries_picker";
const App = () => {
const handleCountryChange = (country) => {
console.log(country);
};
return (
<div>
<h1>Select Country Code</h1>
<CountryPicker onChange={handleCountryChange} />
</div>
);
};
export default App;
Screenshots
Parameter Reference
| Parameter | Type | Description |
| :---------------- | :--------- | :----------------------------------------------------------- |
| onCountryChange
| function
| Required. function to be called when a country is picked |
| style
| object
| optional. An object containing custom styles |
Used By
This project is used by the following companies:
- kibuti software
- Ennovate ventures
Support
For support, email [email protected]