1.3.0 • Published 5 years ago

@geniusdevs/react-native-code-input v1.3.0

Weekly downloads
6
License
MIT
Repository
github
Last release
5 years ago

React-Native-Code-Input

React-Native-Code-Input is an easy to use React Native Component for Confirmation Code Input.

Features

  • Fully Capable of customizing styles
  • Change keyboard Type
  • Change Keyboard return key type
  • Change number of inputs based on your confirmation code length
  • handling different events

Installation

use npm to install the package

npm install --save @geniusdevs/react-native-code-input

Usage

import {CodeInput} from '@geniusdevs/react-native-code-input';

const App = () => {
    return (
          <CodeInput/>
    );
};

Props

Attributes

AttributeDescriptionDefault Value
enabledenables or disables the componenttrue
lengthNumber of Inputs6
keyboardTypeKeyboard type to show. Possible values are: - default- number-pad- decimal-pad- numeric- email-address- phone-padnumeric
returnKeyTypeDetermines how the return key should look.Possible values are: - done- go- next- search- senddone
inputContainerStyleStyle of the each input View container{}
containerStyleStyle of the View container{}
inputStyleStyle of each TextInput{}
focusedInputStyleStyle of the container of focused TextInput{borderBottomColor: 'green'}

Events

EventDescription
onValueChangeAn event to get the value of inputs as a string
onClickThis event is called whenever one of the inputs is touched
onKeyPressThis event is called whenever a keyboard button is pressed
onFinishThis event is called whenever the whole code is entered.This event is useful when you want to verify the code as soon as the last digit in entered.

Contributing

Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.

License

MIT

1.3.0

5 years ago

1.2.0

5 years ago

1.1.3

5 years ago

1.1.2

5 years ago

1.1.1

5 years ago

1.1.0

5 years ago