Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/vaibhav-systango/react-contact-number-input


https://github.com/vaibhav-systango/react-contact-number-input

Last synced: about 1 month ago
JSON representation

Awesome Lists containing this project

README

        

Welcome to react-contact-number-input 👋



Version

License: MIT

> International phone number input component for react

## Install

```sh
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:

```js live=true
import { PhoneInput } from "react-contact-number-input";
;
```
#### [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 `[email protected]` is required due to `hooks` usage in the dependency