react-native-code-textinput

A React Native component for code input.

Usage no npm install needed!

<script type="module">
  import reactNativeCodeTextinput from 'https://cdn.skypack.dev/react-native-code-textinput';
</script>

README

react-native-code-textinput

Input code component for React Native on iOS and Android.

Examples

React Native Code Input Squared React Native Code Input Rounded React Native Code Input with Border React Native Code Input Video1 React Native Code Input Video2 React Native Code Input Video1

Setup

npm install --save react-native-code-textinput

Usage

import CodeInput from 'react-native-code-textinput';
...
<CodeInput 
        codeSize={4} 
        prefilledValue={"1234"}  
        onValueChange={(val) => { }} 
        inputStyle={styles.input_style} >
</CodeInput>
...

Properties

name description type
codeSize Size of the code (Number of TextInput to display) Boolean
prefilledValue Fill the inputs with default value String (OPTIONAL)
keyboardTypeOptions Keyboard type of inputs KeyboardTypeOptions (OPTIONAL)
initValueTextInput Default value for the TextInput String (OPTIONAL)
inputStyle Custom style of the Textinputs TextStyle (OPTIONAL)
activeStyle Custom style of when inputs are active TextStyle (OPTIONAL)

Methods

name description returns
onValueChange() Event fired when the user fill an input String