Skip to content

Commit b79729a

Browse files
committed
Documentation Updated
1 parent 0e1bbe9 commit b79729a

File tree

1 file changed

+19
-10
lines changed

1 file changed

+19
-10
lines changed

README.md

Lines changed: 19 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -18,9 +18,10 @@
1818

1919
<h4>Light Weight and <b>Robust</b> Splitted Text Input.</h4>
2020

21-
- Design skeleton loading screen of your choice
22-
- Pass colors of your choice
23-
- Powered by Reanimated 3
21+
- Design split OTP component of your choice
22+
- Pass number of OTP digits by your choice
23+
- Fully Customizable by props
24+
- Very Easy to use
2425
- Make your apps professional in UI/UX
2526

2627

@@ -60,24 +61,32 @@ required props to display the splitted otp text input as shown in the code snipp
6061
import OtpTextInput from 'react-native-text-input-otp'
6162

6263
const App = () => {
64+
const [otp, setOtp] = React.useState('');
6365

6466
return(
65-
67+
<OtpTextInput
68+
otp={ otp }
69+
setOtp={ setOtp }
70+
digits={5}
71+
/>
6672
)
6773

6874
};
6975
```
7076

7177

7278

73-
For Live `Demo` [(Expo Snack)](https://snack.expo.dev/@mmusaib/react-native-skeleton-loading?platform=android)
79+
For Live `Demo` [(Expo Snack)](https://snack.expo.dev/@mmusaib/react-native-text-input-otp?platform=android)
7480

7581
# ⭐ 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-
82+
| Name | Type | Reuired | Description |
83+
| ---- | ----------- | ------ | ----------- |
84+
| otp | state variable | Yes | State variable to store the otp
85+
| setOtp | state update method | Yes | Method to update state variable
86+
| digits | numeric | Yes | No of otp split fields
87+
| style | style object | No | Style of the input fields
88+
| fontStyle | style object | No | Style of font in input fields
89+
| focusedStyle | style object | No | Style of field when in focus
8190

8291

8392

0 commit comments

Comments
 (0)