Phone Pin Input for React Native
npm install @pakenfit/react-native-pin-inputPhone Pin Input for React Native.


``sh`
npm install @pakenfit/react-native-pin-input --save
Or
`sh`
yarn add @pakenfit/react-native-pin-input
#### Dependencies
This library needs these dependencies to be installed in your project before you can use it:
` Orsh`
npm install expo-clipboard --save
`sh`
yarn add expo-clipboardexpo-clipboard
#### Using Bare React Native ?
For to work you need to follow these additional steps to install expo modules.
- Fully customizable
- OTP autofill support (both Android and iOS, not tested on web should work as well)
- Compatible with Expo
- Written in Typescript
---
`js
import { Button, StyleSheet, View } from 'react-native';
import { PinInput, PinInputRef } from '@pakenfit/react-native-pin-input';
export default function App() {
const ref = React.useRef
return (
);
}
`
---Props
.---
$3
The callback function with the final OTP when finish filling the inputs.$3
The props for each TextInput.---
$3
The style applied to each TextInput.---
$3
The props for the View container.---
$3
The style applied to the View container.---
$3
Should autoFocus the first input element.API
The PinInput component provides the following methods through the PinInputRef:-
clear(): clear all the pin inputsTypes
$3
The PinInputRef type represents the reference to the PinInput component, allowing access to its methods. It has the only method: clear()` see above.See the contributing guide to learn how to contribute to the repository and the development workflow.
MIT
---
Made with create-react-native-library