A responsive and lightweight HTML/CSS/JavaScript-based OTP (One-Time Password) verification app. This project demonstrates OTP generation, timer-based expiration, and basic validation. Includes a Dark Mode toggle for improved user experience.
- β Generate a random 6-digit OTP
- β³ OTP expires automatically after 30 seconds
- πΆοΈ Light/Dark mode toggle
- π Show/Hide OTP option
- π± Mobile responsive
- β‘ No external libraries used
- Generate OTP: Click on "Generate OTP" to receive a 6-digit code.
- Timer Starts: OTP is valid for 30 seconds.
- Enter OTP: Type the received OTP in the input field.
- Verify: Click "Verify OTP" to validate.
- Success/Error Messages: Displays appropriate message for success, incorrect input, or expiry.
You can toggle dark mode using the checkbox switch provided at the top right.
- Increase/decrease timer duration in the
secondsLeftvariable in the script. - Style enhancements can be made via CSS variables under
:root. - Extend functionality by connecting with backend APIs or SMS services.
- A modern web browser (Chrome, Firefox, Edge, etc.)