react_countries_picker

0.0.8 • Public • Published

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


Project Banner

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:

Support

For support, email headricleonard@gmail.com

Package Sidebar

Install

npm i react_countries_picker

Weekly Downloads

6

Version

0.0.8

License

none

Unpacked Size

1.1 MB

Total Files

6

Last publish

Collaborators

  • headric