Package Exports
- react-contact-number-input
- react-contact-number-input/dist/index.js
This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (react-contact-number-input) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.
Readme
Welcome to react-contact-number-input 👋
International phone number input component for react
Install
npm install react-contact-number-inputAuthor
👤 vaibhav-systango
Usage
You need to import ReactCountryInput from package react-country-input with the props using below-
Code Example:
import { PhoneInput } from "react-contact-number-input";
<PhoneInput
disabled={disabled}
containerClass={containerClass}
countryCode={currentCountryCode}
onChange={handleOnChange}
placeholder={placeholder}
/>;[Demo ] (https://react-contact-number-input.web.app/)
Component Props
| Name | Type | Description |
|---|---|---|
| onChange | func | required, returns the object with the details of the number |
| countryCode | string | default value= 'us', selected country phone code. |
| placeholder | string | default value= 'Enter Mobile Number' ,change the value of phone input placeholder |
| containerClass | string | default value= '' ,change the phone input styling |
| disabled | boolean | default value= false ,handles the input to be disabled or not |
Notes on Requirements
At least React@17.0.2 is required due to hooks usage in the dependency