IN

Input Otp

input-otp

One-time password input component for React.

Utilities
react
otp
input
accessible
input-otp
Utilities
javascript
npm
frontend
open source
Stars
1
Weekly
0
Open issues
0
Bundle
~60 kB

Installation

npm install input-otp

Code example

import { useInputOtp } from "input-otp";

export function Example() {
  const value = useInputOtp();
  return <p>{String(value)}</p>;
}

Pros & cons

Pros

  • Actively maintained by Guilherme Rodz
  • 0 weekly downloads. Battle tested
  • First-class TypeScript definitions
  • MIT licensed

Considerations

  • Adds roughly ~60 kB to your bundle
  • Needs client-only rendering in SSR frameworks
  • Not supported in React Native
  • 0 open issues on GitHub

FAQs

Alternatives & similar libraries