
Description
react-native-confirmation-code-field is a small React Native component for entering a confirmation code, such as an SMS code, on iOS, Android and the web. It is described as simple and tiny at about 3.8 KB. Its features include React Compiler compatibility, clearing part of the code by tapping a cell, fast paste of SMS codes on iOS and on the web, and custom paste handling on Android. It exposes a ref to the underlying TextInput, and it is highly customizable, so it can be used as a masked TextInput. The author took a minimal approach: the component provides low-level behavior, and developers are advised to build their own wrapper that applies styles and basic configuration. The README lists ready-made variants that can be used as starting points, including an animated variant, a formatting example, an underline variant, a show and hide password example and a mask variant. The README explains how the component works, with an invisible TextInput stretched over the displayed cells, which solves paste from SMS on iOS and keeps characters from being lost while typing fast. Install it with yarn, and for React Native 0.63 and older, use version 6 of the package.…
Highlights
- Confirmation code input for iOS, Android and web
- Tiny, about 3.8 KB
- Fast paste of SMS codes
- Ref to the TextInput
- Masked and customizable
Ratings & Reviews
No ratings yet
Be the first to rate react-native-confirmation-code-field.
People also visit

react-native-advanced-input-mask
Text input mask for React Native on iOS, Android and web

react-native-mask-input
TextInput with mask for ReactNative on both iOS and Android
React Native Otp Entry
Simple and fully modifiable OTP Input Component for React Native
react-native-confirmation-code-field FAQ
What is react-native-confirmation-code-field?
A small React Native component for entering a confirmation code on iOS, Android and the web.
Does it support pasting an SMS code?
Yes. The README says it supports fast paste of SMS codes on iOS and web, and custom paste on Android.
How do I install it?
With yarn, and for React Native 0.63 and older, version 6 of the package.
Can I use it as a masked input?
Yes. The README says it can be used as a masked TextInput.
Does it ship styles?
No. The README advises writing your own wrapper with your styles.
Is there a live example?
The README links to a documentation site, an example app and a live Expo app.
What are the best react-native-confirmation-code-field alternatives?
Popular alternatives to react-native-confirmation-code-field include react-native-advanced-input-mask, react-native-phone-number-input and react-native-mask-input. See all react-native-confirmation-code-field alternatives














