1.5.9 • Published 3 years ago

react-country-input v1.5.9

Weekly downloads
-
License
-
Repository
-
Last release
3 years ago

React Phone Country Input

This npm is used for getting phone code of countries with its phone input mask.

Install

npm i -S react-country-input
yarn add react-country-input

Using it

<ReactCountryInput />

Usage

You need to import ReactCountryInput from package react-country-input with the props using below-

Code Example:

import ReactCountryInput from "react-country-input";
<ReactCountryInput
  phoneNumber={phoneNumber}
  setPhoneNumber={setPhoneNumber}
  countryCode={countryCode}
  setCountryCode={setCountryCode}
  placeholder={placeholder}
/>

Component Props

Properties used to customise the rendering:

NameTypeDescription
phoneNumberstringshowing input phone number with phone input mask
setPhoneNumberfunccallback function return phone input value with masking
countryCodestringselected country phone code.
setCountryCodefunccallback function return selected country phone code in string
placeholderstringoptional ,change the value of phone input placeholder
classnamestringoptional ,change the phone input styling

Notes on Requirements

At least React@16.4.1 is required due to hooks usage in the dependency

Notes

Pre 1.0.0 and React < 16.4.1 support details in 0.14.0.

License

MIT

1.5.9

3 years ago

1.5.8

3 years ago

1.5.7

3 years ago

1.5.6

3 years ago

1.4.6

3 years ago

1.2.8

3 years ago

1.4.5

3 years ago

1.2.7

3 years ago

1.4.4

3 years ago

1.2.6

3 years ago

1.4.3

3 years ago

1.2.5

3 years ago

1.4.2

3 years ago

1.2.4

3 years ago

1.4.1

3 years ago

1.2.3

3 years ago

1.4.0

3 years ago

1.3.9

3 years ago

1.3.8

3 years ago

1.5.5

3 years ago

1.3.7

3 years ago

1.5.4

3 years ago

1.3.6

3 years ago

1.5.3

3 years ago

1.3.5

3 years ago

1.5.2

3 years ago

1.3.4

3 years ago

1.5.1

3 years ago

1.3.3

3 years ago

1.5.0

3 years ago

1.3.2

3 years ago

1.3.1

3 years ago

1.3.0

3 years ago

1.4.9

3 years ago

1.4.8

3 years ago

1.4.7

3 years ago

1.2.9

3 years ago

1.2.0

3 years ago

1.1.1

3 years ago

1.1.9

3 years ago

1.1.8

3 years ago

1.0.9

3 years ago

1.1.7

3 years ago

1.0.8

3 years ago

1.1.6

3 years ago

1.0.7

3 years ago

1.1.5

3 years ago

1.0.6

3 years ago

1.1.4

3 years ago

1.0.5

3 years ago

1.2.2

3 years ago

1.1.3

3 years ago

1.2.1

3 years ago

1.1.2

3 years ago

1.0.4

3 years ago

1.0.3

3 years ago

1.0.2

3 years ago

1.0.1

3 years ago

1.0.0

3 years ago