Skip to content

Commit 7264834

Browse files
authored
Merge pull request #18 from johelder/dev
dev->main
2 parents bccc617 + dc84816 commit 7264834

File tree

4 files changed

+9
-1
lines changed

4 files changed

+9
-1
lines changed
-1.6 MB
Binary file not shown.
79.2 KB
Loading

README.md

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,13 @@
22

33
react-native-input-code-otp is a high-performance and fully customizable OTP input component for React Native, inspired by @shadcn/ui.
44

5-
![Presentation Video](./.github/assets/react-native-input-code-otp.gif)
5+
![Presentation Image](./.github/assets/react-native-input-code-otp.png)
6+
7+
## Demo
8+
9+
Try it on Snack Expo:
10+
11+
[![Snack Expo App](https://img.shields.io/badge/Snack-fff.svg?style=for-the-badge&logo=EXPO&labelColor=000&logoColor=FFF)](https://snack.expo.dev/@anday013/demo-react-native-otp-entry)
612

713
## Installation
814

src/hooks/use-text-input-otp.tsx

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,8 @@ export function TextInputOTPProvider({
5050

5151
if (text.length === maxLength) {
5252
onFilled?.(text);
53+
setCurrentIndex(text.length - 1);
54+
return;
5355
}
5456

5557
if (text.length < maxLength) {

0 commit comments

Comments
 (0)