react-native-otp-custom-library
TypeScript icon, indicating that this package has built-in type declarations

0.3.0 • Public • Published

react-native-otp-custom-library

Custom OTP Field for use in React Native.

Installation

npm install react-native-otp-custom-library

Alt text Alt text

Usage

import { OtpCustomLibraryView } from "react-native-otp-custom-library";

// ...

<OtpInput
filledColor="#21C274"
nonFilledColor="#DCDCDC"
currentFieldColor="#8735E1"
totalField={6}
onChange={onChange}
/>
Props Description required
filledColor Border color for filled fields required
nonFilledColor Border color for non filled fields required
currentFieldColor Border color for the current index border required
totalField Total number of fields required
onChange Callback for value change, e.g., onChange = (val) => { setYourState(val) } required
style Style for the main OTP field container
textInputStyle Style for the OTP input fields

Contributing

See the contributing guide to learn how to contribute to the repository and the development workflow.

License

MIT


Made with create-react-native-library

Package Sidebar

Install

npm i react-native-otp-custom-library

Weekly Downloads

3

Version

0.3.0

License

MIT

Unpacked Size

61.8 kB

Total Files

18

Last publish

Collaborators

  • jayanshu