Skip to content

ShlokDesai33/React18-OTP-Input

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

12 Commits
 
 
 
 
 
 

Repository files navigation

React 18 OTP Component

Welcome to the React One-Time Password (OTP) Field component! This component will enable you to easily and efficiently implement an OTP input field in your react application. The component uses TailwindCSS for styling.

📖 Table of Contents

  1. Installation
  2. Usage
  3. Props
  4. Demo
  5. Contribute
  6. License
  7. Support & Feedback

🛠 Installation

First install the only dependency:

# npm install clsx

Next, copy the code in the src file into your project and import it anywhere to get started!

🎯 Usage

import OTPField from '[PATH_TO_OTPField]';

// Render the OTPField
<OTPField length={4} />

⚙️ Props

Prop Name Type Description
length number The number of OTP digits.
className string (Optional) Custom className to be added to the container.
error boolean (Optional) If true, it applies error styling to the input.

🌟 Demo

Link to YT video

🤝 Contribute

Got ideas to make this component even more amazing? Create a pull request! 🤝

📜 License

This project is licensed under the MIT License. See the LICENSE file for more details.

📞 Support & Feedback

Having issues or need some help? Open an issue, and I'll do my best to assist you. I appreciate any feedback or suggestions to make this component better! 🙌


Made with 💙 by Shlok

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published