Skip to content
Eskais UI

Forms

OTP Input

UI SDK OTPInput: one native input shown as slots, with paste and one-time-code autofill.

Example

Installation

npx shadcn@latest add @eskais/otp-input
Brings alonginputfield

Usage

Import
import {  createOTPInputController,  OTPInput,  OTPInputGroup,  OTPInputSeparator,  OTPInputSlot,} from "@/components/ui/otp-input"

API reference

Other exports

createOTPInputControllertype OTPInputControllertype OTPInputSlotStatetype OTPInputState

Accessibility

  • One native input shown as slots, so paste, autofill and one-time-code all work.
  • Treated as secret: agents can fill it but never read it back.

Agent actions

Runs agent.snapshot() from @ui-sdk/react/agent on the live preview above.