MiHCM
primitives/@mihcm/ui·v0.21.0·stable

InputOTP

One-time password / verification code input with individual character slots. Powered by input-otp.

Live preview

Adjust the controls on the right; the preview and code update in real time.

Value: (empty)

example.tsxtsx
import { InputOTP, InputOTPGroup, InputOTPSlot, InputOTPSeparator } from '@mihcm/ui/InputOTP';

export function Example() {
  return (
    <InputOTP
  maxLength="6"
    ></InputOTP>
  );
}

Install

Both paths are valid. CLI ships the source into your repo (you own it). Install pins via npm.

npx @mihcm/cli add InputOTP
Copies the source into components/ds/InputOTP.tsx. You own the file. Use --out to override the directory or --force to overwrite.