Skip to Content
SmartUI

OTP Input

Verification code input: one digit per box.

Usage

import { OTPInput } from '@smartui/react';
import '@smartui/react/styles.css';

When to use

  • Email verification codes and staff PINs.

When not to use

  • Passwords. Use Field.

Props

PropTypeDefaultDescription
labelstringrequired
lengthnumber6
value, onChange, onCompletestring, (v) => void, (v) => void-
isMaskedbooleanfalseUse for PINs.
isInvalidbooleanfalse

Accessibility

  • Exposed as one input, not six.
  • Pasting six digits fills every box.

On this page