One real input. Native wins.
The slots are visual. The browser, keyboard and assistive tech still meet a single HTML input.
One-time passcode input for React. Unstyled, accessible, and copy-paste friendly out of the box.
845,489,561 total downloads, growing by about 38 a second.
What a single native input can do when the visible slots only mirror its state.
The slots are visual. The browser, keyboard and assistive tech still meet a single HTML input.
The same component, four render props. Pick one, or let it cycle.
Detect the injected badge, make 40px of clipped room, and keep it clear of the final slot.
width: calc(100% + 40px)clip-path: inset(0 40px 0 0)Import the library’s regex and pass it directly to the real input.
import { REGEXP_ONLY_DIGITS } from 'input-otp'<OTPInput pattern={REGEXP_ONLY_DIGITS} maxLength={6} />Measured from the published input-otp@1.4.2 package.
MIT licensed, zero dependencies, one real input under the slots.