Component

OTPInput

One-time password / verification code input with auto-focus.

tsx
import { OTPInput, PINInput } from 'wss3-forge'

Usage

Auto-focuses next input on entry

PINInput for masked PIN codes

Supports paste from clipboard

onComplete fires when all digits entered


Examples

Verification Code (6 digits)

tsx
1<OTPInput
2 length={6}
3 onComplete={(code) => console.log('Code:', code)}
4/>

PIN Code (4 digits)

tsx
1<OTPInput
2 length={4}
3 onComplete={(pin) => console.log('PIN:', pin)}
4/>

Previous

NumberInput

Next

PhoneInput

Last updated: December 2025

Cookies

We use cookies to improve your experience and save your preferences.