Skip to content
FormsFree

OTP Field

A segmented input for one-time passwords and verification codes.

Usage

Installation

bash
npm install @wunderui/react

Then import what you need:

tsx
import { OtpField, OtpFieldInput } from "@wunderui/react"

Examples

Length

4 and 6 digit codes.

In context

How the component is used inside real screens — the same compositions as the Usage section of the Figma page.

Phone verification

Six boxes for the code sent by SMS, with a resend timer.

Check your phone
We sent a 6-digit code to +49 ••• ••• 42

API Reference

PropTypeDefault
lengthnumber— (required)
value / defaultValuestring—
onValueChange(value: string) => void—