Skip to content

This javascript plugin helps to render otp input for any project

Notifications You must be signed in to change notification settings

saikatdutta1991/QuickOTP

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

11 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

QuickOTP

This javascript plugin helps to render otp input for any project. Click here for demo

Screen Shot

enter image description here

Usage

  • import .css and .js file inside the html page.
 <link  rel="stylesheet"  href="quickotp.css">
<script  src="quickotp.js"></script>
  • Add container where you need to render the OTP input box in your body html.
<div id="otp-holder"></div>
  • Now initialise the QuickOTP library followed after importing quickotp.js with config and render.
<script>
	let  qinstance = new  QuickOTP("#otp-holder", { 
		otpLength :  6,
		boxSize :  "50px",
		boxColor :  "#d35400",
		fontSize :  "27px"
	}).render();
</script>
  • To get the otp code entered by user. Call the instance method. getOtp()
<script>
	qinstance.getOtp();
</script>

Thanks. That's all guys for now.

About

This javascript plugin helps to render otp input for any project

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published