OTP Input

Material Design 3 OTP/verification code input component

OTP Input

OTP (One-Time Password) Input is designed for entering verification codes sent via SMS, email, or authenticator apps. Each digit has its own field for easy entry.

Basic Usage

Basic OTP Input

Lengths

4 Digits

4-Digit OTP

6 Digits

6-Digit OTP

Variants

Outlined (Default)

Outlined OTP Input

Filled

Filled OTP Input

Underlined

Underlined OTP Input

Sizes

Small

Small OTP Input

Large

Large OTP Input

With Separator

OTP with Separator

-

States

Focused

Focused State

Filled Fields

Filled Fields

Error State

Error State

Invalid verification code

Success State

Success State

Code verified successfully

Disabled

Disabled OTP Input

With Label and Helper

Complete OTP Form

We sent a 6-digit code to your email

Didn't receive the code? Resend

API Reference

Class Names

ClassDescription
.otp-inputBase container (required)
.otp-input-fieldIndividual digit field (required)
.otp-input-44-digit layout
.otp-input-66-digit layout
.otp-input-outlinedOutlined variant
.otp-input-filledFilled variant
.otp-input-underlinedUnderlined variant
.otp-input-smSmall size
.otp-input-lgLarge size
.otp-input-separatorSeparator element
.otp-input-field-focusedFocused field state
.otp-input-field-filledFilled field state
.otp-input-errorError state
.otp-input-successSuccess state
.otp-input-disabledDisabled state
.otp-input-helperHelper text
.otp-input-helper-errorError helper text
.otp-input-helper-successSuccess helper text