1.3.1 • Published 1 year ago

@mustapha-ghlissi/react-native-otp v1.3.1

Weekly downloads
-
License
MIT
Repository
github
Last release
1 year ago

React Native OTP

@mustapha-ghlissi/react-native-otp: One Time Password Input Component for React Native.

MIT License npm npm npm npm github github github github

Screenshots

Screen 1 Screen 2 Screen 3 Screen 3 Screen 3

Demo

Demo

Installation

Use npm or yarn to install the package.

Using npm
npm i @mustapha-ghlissi/react-native-otp
Using yarn
yarn add @mustapha-ghlissi/react-native-otp

Usage

    import Otp from '@mustapha-ghlissi/react-native-otp';

    <Otp onConfirm={code => console.log(code)}/>

Props

ParameterTypeDescription
lengthnumber: optionalNumber of OTP digits (default = 4)
filledOtpColorstring: optionalBorder color when the OTP is fully filled and it's used as the shadow color if enabledFillShadow is set to true
enabledFillShadowboolean: optionalShow success shadow when the OTP is fully filled
cursorColorstring: optionalInputText cursor color
selectionColorstring: optionalInputText content selection color
filledColorstring: optionalInputText border color when it's filled
outlineColorstring: optionalInputText border color when it's focused
inputStyleTextStyle, ViewStyle Props: optionalInputText custom style
onConfirmcallback: requiredWhen the OTP is filled, then you can do whatever you need with the entered code.

Donate

Donate with Wise by clicking this link or by scanning the QRCode

Wise

Authors

Other libraries

1.3.1

1 year ago

1.3.0

1 year ago

1.2.0

1 year ago

1.1.2

1 year ago

1.1.1

1 year ago

1.1.0

1 year ago

1.0.0

1 year ago