Registry Index

Search the catalog

Type to search items across every indexed registry, or pick a page.

ComponentReactregistry:ui4 dependencies

Input OTP

input-otp

One-time-passcode input on input-otp with individual slots, a blinking fake caret, active-slot ring and aria-invalid danger styling. Exports InputOTP, InputOTPGroup, InputOTPSlot, InputOTPSeparator.

Live, loading

Starting the live preview…

Rendered from its demo Input otp Demo. Runs in a sandboxed frame on a separate origin, in its registry's own theme. Mounted with no props — an item that paints an empty box is given its name as text, and some items need input to show anything.

Notes from the author

Set maxLength to the code length and group slots with InputOTPGroup; InputOTPSeparator draws a divider between groups. Read the value from onChange.
2 other registries

Similar components

Other registries' take on input-otp.

1 demo

See it in use

Files this registry ships to demonstrate the item. They are indexed and installable, but they don't count as components of their own.

Usage example for the ai2 input-otp component.

@ai2

More from @ai2