OTP Input
A one-time-code (or PIN) input: a row of single-character boxes that behaves as one field. Type a digit and focus advances to the next box; press Backspace in an empty box to move back. Each box is individually labelled and the row has a group name, so it is navigable by keyboard and assistive technology.
- Axe
- Focus
- Paste
Preview
Installation
npx shadcn@latest add https://ui.publictheta.com/r/otp-input.jsonConformance
Verified against the @publictheta/ui-spec otp-input specification on both the React and vanilla reference implementations, across Chromium, Firefox, and WebKit.
- Axe — No WCAG 2 A/AA axe-core violations
- Focus — A visible focus indicator appears on keyboard focus (WCAG 2.4.7)
- Paste — A paste lands: the widget takes the richest flavour it understands, never injects markup it did not ask for, and pastes as plain text on Shift+Cmd/Ctrl+V
See the full conformance matrix across all components.