OTP Input

Individual digit input cells for verification code entry

import { OTPInput } from "@plexui/ui/components/OTPInput";

Examples

Overview

Filled state

Grouped (3+3)

With error

Disabled

Reference

PropTypeDefaultDescription
lengthnumber6Number of digit cells
valuestringControlled value
onChange(value: string) => voidCalled when value changes
onComplete(value: string) => voidCalled when all digits filled
groupingnumber[]Grouping pattern with extra gap (e.g. [3,3])
invalidbooleanfalseInvalid visual state
errorMessagestringError message below the input
disabledbooleanfalseDisable all cells
autoFocusbooleanfalseAuto-focus first cell on mount