react-native-phone-mask-input
1.1.1 • Public • Published @kai24/react-native-phone-mask-input
Installation
yarn
yarn add @kai24/react-native-phone-mask-input
npm
npm i @kai24/react-native-phone-mask-input --save
Usage
import PhoneMaskInput from "@kai24/react-native-phone-mask-input";
<PhoneMaskInput
value=''
placeholder='Enter phone'
onChange={(value) => console.log('value', value)}
/>
Props
Name |
Type |
Default |
Description |
value |
[String, Number] |
|
Value to be render in the input |
placeholder |
String |
"" |
Placeholder to be shown when no tags |
autoDetectCountry |
Boolean |
false |
Detect visitor country |
showFlag |
Boolean |
false |
Show country flag |
flagSize |
String |
normal |
Available values: small, normal, big |
wrapperClass |
String |
{ display: flex; flex-direction: row; align-items: center; height: 40px; } |
Style class of div wrapper input and flag |
inputClass |
String |
{ height: 20px; } |
Style class of input |
flagClass |
String |
{ margin: 0; } |
Style class of flag (span tag) |
Package Sidebar
Install
npm i react-native-phone-mask-input
Weekly Downloads