
Security News
Another Round of TEA Protocol Spam Floods npm, But It’s Not a Worm
Recent coverage mislabels the latest TEA protocol spam as a worm. Here’s what’s actually happening.
input-otp-native
Advanced tools
One time passcode Input For React Native/Expo. Unstyled and fully customizable.
✨ One time passcode Input For React Native/Expo. Unstyled and fully customizable. ✨
otp-input## npm
npm install input-otp-native
## yarn
yarn add input-otp-native
#pnpm
pnpm add input-otp-native
| Prop | Type | Default | Description |
|---|---|---|---|
maxLength | number | Required | Number of OTP digits |
render | (props: RenderProps) => ReactNode | Required | Render function for OTP slots |
value | string | undefined | Controlled value of the input |
onChange | (value: string) => void | undefined | Callback when value changes |
onComplete | (value: string) => void | undefined | Callback when all digits are filled |
containerStyle | ViewStyle | undefined | Style for the container |
pattern | string | undefined | Regex pattern for input validation |
textAlign | 'left' | 'center' | 'right' | 'left' | Text alignment within input |
pasteTransformer | (pasted: string) => string | undefined | Transform pasted text |
| Prop | Type | Description |
|---|---|---|
slots | SlotProps[] | Array of slot objects to render |
isFocused | boolean | Whether the input is focused |
| Prop | Type | Description |
|---|---|---|
char | string | null | Character in the slot |
isActive | boolean | Whether the slot is active |
hasFakeCaret | boolean | Whether to show fake caret |
placeholderChar | string | null | Placeholder character |
The library is mainly inspired by otp-input and has a similar API, so we recommend using it on the web.
We can easily create the same component for web and create a new file for it (example/src/examples/apple.web.tsx)
See the contributing guide to learn how to contribute to the repository and the development workflow.
MIT
create-react-native-library for the library template.
otp-input for the original idea and some code.
FAQs
One time passcode Input For React Native/Expo. Unstyled and fully customizable.
We found that input-otp-native demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Security News
Recent coverage mislabels the latest TEA protocol spam as a worm. Here’s what’s actually happening.

Security News
PyPI adds Trusted Publishing support for GitLab Self-Managed as adoption reaches 25% of uploads

Research
/Security News
A malicious Chrome extension posing as an Ethereum wallet steals seed phrases by encoding them into Sui transactions, enabling full wallet takeover.