Form input
OTP input
Paste, autofill, edit, and group a code without multi-input focus traps.Choose it deliberately
Use it for short codes the user copies from somewhere else.
Use when
The code arrives by SMS, email or an authenticator app. Autofill and paste are the fast path; the cells show progress and make a mistyped character easy to spot.
Avoid when
The length is not fixed, or the value is a password. A row of cells promises an exact number of characters.
Composition
Shape the row after the code the user is reading.
Group like the source
Split the row the way the code is printed — `[3, 3]` for `123 456` — so it can be checked chunk by chunk.
Masking
`mask` hides entered characters; a string sets the glyph. Use it only when the code is a secret — hidden characters are slower to check.