1.1.1 ā€¢ Published 2 years ago

react-contact-number-input v1.1.1

Weekly downloads
-
License
MIT
Repository
github
Last release
2 years ago

International phone number input component for react

Install

npm install react-contact-number-input

Author

šŸ‘¤ 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

Component Props

NameTypeDescription
onChangefuncrequired, returns the object with the details of the number
countryCodestringdefault value= 'us', selected country phone code.
placeholderstringdefault value= 'Enter Mobile Number' ,change the value of phone input placeholder
containerClassstringdefault value= '' ,change the phone input styling
disabledbooleandefault 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

1.1.1

2 years ago

1.1.0

2 years ago

1.0.5

2 years ago

1.0.4

2 years ago

1.0.3

2 years ago

1.0.2

2 years ago

1.0.1

2 years ago

1.0.0

2 years ago