Skip to content

Repository files navigation

React OTP Input Component 📦

The React OTP Input component is a customizable input field for entering one-time passwords (OTP) in your React applications. It supports various customization options for input size, styling, and completion callback.

Installation 🚀

To use this component in your React project, you can install it via npm or yarn:

npm install 
yarn add 

Usage

To use the OTPInput component, import it into your React application and integrate it with your UI.

Props

The OTPInput component accepts the following props:
  • size: Specifies the number of input fields.
  • inputStyle: Customizes the style of individual input fields.
  • onComplete: Specifies a callback function to be called when the OTP is complete.
  • containerStyle: Customizes the style of the container div that holds the input fields.
  • width: Customizes the width of the OTP input container.
  • height: Customizes the height of the OTP input fields.

Feature Roadmap

Here's a list of planned features and improvements for this project:

1. Auto Submission

  • Description: Implement auto-submission of the OTP after a certain time interval.
  • Status: Planned

2. Countdown Timer

  • Description: Add a countdown timer to indicate the time remaining for OTP submission.
  • Status: Planned

3. Error Messages

  • Description: Enhance error handling by displaying informative error messages.
  • Status: Planned

4. Styling Enhancements

  • Description: Improve the overall visual design and user interface.
  • Status: Planned

Feel free to contribute or provide feedback on these planned features.

If you have any ideas for additional features or improvements, please create an issue or submit a pull request.

Author

Ayobami Adegoke

Feel free to modify the README to suit your project's specific needs.

About

Input component that allows you to easily integrate OTP input fields into your React applications. This component supports custom styling, error handling, count down and callbacks upon completion.

Resources

Stars

0 stars

Watchers

1 watching

Forks

Releases

Packages

Used by

Contributors

Languages