React native otp input
npm install react-native-otp-field-input
react-native-otp-field-input.mp4
import OTPInput from 'react-native-pin-code-input';
// ...
export default function App() {
const [otp, setOtp] = useState<string>('');
return (
<View style={styles.container}>
<OTPInput
containerStyle={{ width: '90%' }}
autoFocus
pinCount={6}
onOtpFilled={(code) => setOtp(code)}
/>
{otp && <Text>Your OTP is {otp}</Text>}
</View>
);
}
See the contributing guide to learn how to contribute to the repository and the development workflow.
MIT
Made with create-react-native-library