react-country-input v1.5.9
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:
Name | Type | Description |
---|---|---|
phoneNumber | string | showing input phone number with phone input mask |
setPhoneNumber | func | callback function return phone input value with masking |
countryCode | string | selected country phone code. |
setCountryCode | func | callback function return selected country phone code in string |
placeholder | string | optional ,change the value of phone input placeholder |
classname | string | optional ,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
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago