react-phone-number-input-field
v0.2.0
Published
<h1 align="center">Welcome to react-phone-number-input-field ๐</h1> <p> <a href="https://www.npmjs.com/package/react-phone-number-input-field" target="_blank"> <img alt="Version" src="https://img.shields.io/npm/v/react-phone-number-input-field.svg"
Readme
Phone input component with country code and phone number masking with errors
๐ Homepage
Install
npm install --save react-phone-number-input-fieldUsage
import PhoneInputField from 'react-phone-number-input-field';
<PhoneInputField
value={value}
onChange={(e) => setValue(e.target.value)}
placeholder={'Enter your number'}
id={'phone-number-input'}
/>Options
| Name | Type | Description | | ------------- |----------- | ----------- | | classname | string | custom classname | | defaultCountry | string | initial country | | placeholder | string | custom placeholder | | onlyCountries | array | country codes to be included | | excludeCountries| array | country codes to be excluded |
Author
๐ค Noopur Chhajed
Show your support
Give a โญ๏ธ if this project helped you!
This README was generated with โค๏ธ by readme-md-generator
