OTP Input
A 352px row of five or six square cells for a one-time code. Typing moves on, Backspace moves back, and pasting a code fills every cell.
This is a hint text to help user.
Type, or paste a whole code into any cell.
Add an empty Orvain OTP Input with 6 cells, square corners, no shadow.
When to use#
- For verification codes sent by email or text, usually six digits.
- When the code has a fixed, known length, so the cells show how much is left.
When not to use
- Use an Input for passwords or codes of unknown length.
Anatomy#
52px squares, 8px apart, radius 12 (fully round when Pill), a 1px #e1e1e1 stroke inside.
Satoshi Bold 14, centred.
The active cell takes a near-black stroke and a blinking caret.
10px below the row: where the code was sent, or why it failed.
States#
Empty cells, the first ready for input.
Every cell filled.
Red strokes and a red hint.
The code shows but cannot change.
Grey and inert, while checking or after too many tries.
Source#
The OTP Input ships in the free packages, @orvain/react and @orvain/vue, and in the Figma library with every variant and state shown above. The code on this page is the code you install.
Used in these blocks

