Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
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
- Host: GitHub
- URL: https://github.com/vaibhav-systango/react-contact-number-input
- Owner: vaibhav-systango
- Created: 2022-03-10T07:34:23.000Z (almost 3 years ago)
- Default Branch: main
- Last Pushed: 2023-12-05T07:04:53.000Z (about 1 year ago)
- Last Synced: 2024-12-07T07:25:56.299Z (about 1 month ago)
- Language: JavaScript
- Size: 453 KB
- Stars: 15
- Watchers: 1
- Forks: 4
- Open Issues: 3
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
Welcome to react-contact-number-input 👋
> 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