1.1.1 • Published 6 years ago
react-native-phone-mask-input v1.1.1
@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) |