
Security News
Crates.io Implements Trusted Publishing Support
Crates.io adds Trusted Publishing support, enabling secure GitHub Actions-based crate releases without long-lived API tokens.
react-otpcode-input
Advanced tools
An OTP input component using React
npm install react-otpcode-input --save
ES6
import OtpInput from 'react-otpcode-input';
Typescript
import OtpInput from 'react-otpcode-input';
Props | Options | Default | Description |
---|---|---|---|
numberOfInputs | Number | none | Number of OTP inputs to be rendered. |
onChange | (code) => void | none | Returns OTP code typed in inputs. |
onComplete | (code) => void | none | Callback when OTP is completely filled. |
otp | String | none | The value of the OTP passed into the component. |
disabled | boolean | none | Disables all the inputs. |
autoFocus | boolean | none | Auto focuses input on initial page load. |
import OtpInput from 'react-otpcode-input';
<OtpInput
numberOfInputs={6}
onChange={(code) => console.log(code)}
onComplete={(code) => console.log(code)}
otp={""}
autoFocus={true}
/>
MIT
FAQs
OTP Input Component
The npm package react-otpcode-input receives a total of 63 weekly downloads. As such, react-otpcode-input popularity was classified as not popular.
We found that react-otpcode-input demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 4 open source maintainers collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Crates.io adds Trusted Publishing support, enabling secure GitHub Actions-based crate releases without long-lived API tokens.
Research
/Security News
Undocumented protestware found in 28 npm packages disrupts UI for Russian-language users visiting Russian and Belarusian domains.
Research
/Security News
North Korean threat actors deploy 67 malicious npm packages using the newly discovered XORIndex malware loader.