Skip to content

Commit a2cd64a

Browse files
committed
Documentation Added
1 parent 524f933 commit a2cd64a

File tree

7 files changed

+114
-8
lines changed

7 files changed

+114
-8
lines changed

README.md

Lines changed: 108 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,108 @@
1-
# react-native-otp-text-input
2-
A react native/expo package for splitted otp text inputs
1+
| | | | | |
2+
| --------------------------------------- | -------- | ---------- |---------- |---------- |
3+
| <a href="https://www.npmjs.com/package/react-native-text-input-otp">![NPM VERSION](https://img.shields.io/npm/v/react-native-text-input-otp?style=for-the-badge)</a> | <a href="https://www.npmjs.com/package/react-native-text-input-otp">![NPM WEEKLY DOWNLOADS](https://img.shields.io/npm/dw/react-native-text-input-otp?color=%232CA215&label=WEEKLY%20DOWNLOADS&style=for-the-badge)</a> | <a href="https://github.com/mmusaib/react-native-text-input-otp/stargazers">![GITHUB STAR](https://img.shields.io/github/stars/mmusaib/react-native-text-input-otp?label=Give%20Us%20A%20Star&style=for-the-badge)</a> | <a href="https://www.youtube.com/channel/UCSwIR2KBHiqiProH3Me8IZQ">![YOUTUBE VIEWS](https://img.shields.io/youtube/channel/views/UCSwIR2KBHiqiProH3Me8IZQ?label=YOUTUBE%20VIEWS&style=for-the-badge)</a> | <a href="https://www.npmjs.com/package/react-native-text-input-otp">![NPM LIFETIME DOWNLOADS](https://img.shields.io/npm/dt/react-native-text-input-otp?color=%232CA215&style=for-the-badge)</a>
4+
5+
<h1 align="center">
6+
🏳️‍🌈 React Native OTP Text Input
7+
</h1>
8+
9+
<div align="center">
10+
11+
🟢 Splitted OTP Text Input for ReactNative and Expo powered apps
12+
13+
<a href="https://twitter.com/_mmusaib" target="_blank"></a>
14+
<img src="https://i.imgur.com/toxEFWe.png" width="500" />
15+
</div>
16+
17+
18+
19+
<h4>Light Weight and <b>Robust</b> Splitted Text Input.</h4>
20+
21+
- Design skeleton loading screen of your choice
22+
- Pass colors of your choice
23+
- Powered by Reanimated 3
24+
- Make your apps professional in UI/UX
25+
26+
27+
28+
29+
# Compatibility
30+
31+
32+
| iOS | Android | Expo |
33+
--------|---------|------|
34+
||||
35+
36+
37+
38+
39+
# 🔌 Installation
40+
41+
```sh
42+
$ npm install react-native-text-input-otp
43+
44+
```
45+
46+
OR
47+
48+
```sh
49+
$ yarn add react-native-text-input-otp
50+
```
51+
52+
53+
54+
55+
# 😎 Displaying the otp input
56+
All you need is to just import the otp text input component and then pass the
57+
required props to display the splitted otp text input as shown in the code snippet below:
58+
59+
```jsx
60+
import OtpTextInput from 'react-native-text-input-otp'
61+
62+
const App = () => {
63+
64+
return(
65+
66+
)
67+
68+
};
69+
```
70+
71+
72+
73+
For Live `Demo` [(Expo Snack)](https://snack.expo.dev/@mmusaib/react-native-skeleton-loading?platform=android)
74+
75+
# ⭐ Props for the component
76+
| Name | Type | Description |
77+
| ---- | ----------- | ----------- |
78+
| background | hex color string | Hex color string for the background of loading component
79+
| highlight | hex color string | Hex color string for the highlight of loading component
80+
81+
82+
83+
84+
# 💲 Would you like to support me?
85+
86+
If you would like me come up with similar packages, buy me a cup of coffee to boost my energy.
87+
<br><br>
88+
[![Paypal](https://www.paypalobjects.com/webstatic/mktg/Logo/pp-logo-100px.png)](https://paypal.me/mmusaib)
89+
<br><br>
90+
91+
92+
93+
<!-- # ▶️ Watch Tutorial Video
94+
95+
[![Watch video](https://i.imgur.com/QcWCHk9.png)](https://www.youtube.com/watch?v=ZstelmTWhjw) -->
96+
97+
98+
<!-- For Live `Demo` [(Expo Snack)](https://snack.expo.dev/@mmusaib/react-native-stock-star-rating)
99+
100+
101+
102+
103+
104+
105+
106+
107+
108+

dist/OtpInput.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/OtpTextInput.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

index.d.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
import React from 'react';
21
import { ViewStyle, TextStyle } from 'react-native';
32

43
export interface OtpProps {

package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
{
2-
"name": "react-native-otp-text-input",
2+
"name": "react-native-text-input-otp",
33
"version": "1.0.0",
44
"description": "A light weight react-native and expo split text input",
55
"main": "dist/index.js",
@@ -11,7 +11,7 @@
1111
},
1212
"repository": {
1313
"type": "git",
14-
"url": "git+https://github.com/mmusaib/react-native-otp-text-input.git"
14+
"url": "git+https://github.com/mmusaib/react-native-text-input-otp.git"
1515
},
1616
"keywords": [
1717
"otp",

src/OtpInput.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import React from 'react';
1+
22
import { View,TextInput } from 'react-native';
33

44
const OtpInput = ({ digits, otpRef, style, setOtp, otp, _render }) => {

src/OtpTextInput.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
import React from 'react';
12
import OtpInput from "./OtpInput";
23
import {
34
styles,

0 commit comments

Comments
 (0)