Skip to content

hthab1/react-native-pin-code-input

react-native-pin-code-input

React native otp input

Installation

npm install react-native-otp-field-input

Usage

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>
  );
}

Contributing

See the contributing guide to learn how to contribute to the repository and the development workflow.

License

MIT


Made with create-react-native-library

About

No description, website, or topics provided.

Resources

License

Code of conduct

Contributing

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published