# @amiralis1365/react-native-code-input

> A React Native Component to have confirmation Code Inputs.

Latest version **1.1.0** (published 2019-09-09) · ISC license · 0 weekly downloads

## Install

```sh
npm install @amiralis1365/react-native-code-input
pnpm add @amiralis1365/react-native-code-input
yarn add @amiralis1365/react-native-code-input
bun add @amiralis1365/react-native-code-input
```

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.1.0 |
| Published | 2019-09-09 |
| First published | 2019-09-08 |
| Weekly downloads | 0 |
| License | ISC |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 0 |
| Unpacked size | 13 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 3 |
| Author | Amirali Sadrzadeh |
| Maintainers | amiralis1365 |
| Keywords | react-native, Validation, Confirmation, Input |

## Links

- npm: https://www.npmjs.com/package/@amiralis1365/react-native-code-input
- Repository: https://github.com/amiralis1365/React-Native-Code-Input
- Issues: https://github.com/amiralis1365/React-Native-Code-Input/issues
- npm.io page: https://npm.io/package/@amiralis1365/react-native-code-input

## Alternatives

- [@sindresorhus/slugify](https://npm.io/package/@sindresorhus/slugify.md) — 3.7M weekly downloads
- [solid-js](https://npm.io/package/solid-js.md) — 2.7M weekly downloads
- [expo-glass-effect](https://npm.io/package/expo-glass-effect.md) — 2.5M weekly downloads
- [nanoassert](https://npm.io/package/nanoassert.md) — 780.8K weekly downloads
- [@ffmpeg/ffmpeg](https://npm.io/package/@ffmpeg/ffmpeg.md) — 529.5K weekly downloads

## Recent versions

- 1.1.0 (latest) — 2019-09-09
- 1.0.1 — 2019-09-08
- 1.0.0 — 2019-09-08

## README

# 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

```bash
npm install --save React-Native-Code-Input
```

## Usage

```javascript
import {CodeInput} from '@amiralis1365/react-native-code-input';

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

## Props

### Attributes
| Attribute | Description | Default Value |
| --- | --- | --- |
| enabled | enables or disables the component | `true` |
| length | Number of Inputs | `6` |
| keyboardType | Keyboard type to show. <br/>Possible values are: <br/>- `default`<br/>- `number-pad`<br/>- `decimal-pad`<br/>- `numeric`<br/>- `email-address`<br/>- `phone-pad`| `numeric` |
| returnKeyType | Determines how the return key should look.<br/>Possible values are: <br/>- `done`<br/>- `go`<br/>- `next`<br/>- `search`<br/>- `send`  | `done` |
| inputContainerStyle | Style of the each input `View` container | {} |
| containerStyle | Style of the `View` container | {} |
| inputStyle | Style of each `TextInput`  | {} |

### Events
| Event | Description |
| --- | --- |
| onValueChange | An event to get the value of inputs as a `string` |
| onClick | This event is called whenever one of the inputs is touched |
| onKeyPress | This event is called whenever a keyboard button is pressed |
| onFinish | This event is called whenever the whole code is entered.<br/>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](https://choosealicense.com/licenses/mit/)

---
_Source: https://npm.io/package/@amiralis1365/react-native-code-input · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
