π
Welcome to react-phone-number-input-field
Phone input component with country code and phone number masking with errors
π Homepage
Install
npm install --save react-phone-number-input-field
Usage
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
Show your support
Give a
This README was generated with