OTP Input
UI SDK OTPInput: one native input shown as slots, with paste and one-time-code autofill.
Example
otp-input-demo.tsxCopy code
Installation
Copy code
Usage
ImportCopy code
API reference
OTPInput
OTPInputGroup
OTPInputSlot
OTPInputSeparator
Other exports
createOTPInputControllertype OTPInputControllertype OTPInputSlotStatetype OTPInputStateAccessibility
- 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.