InputOTP
Atom
A segmented one-time-code field: length cells display the typed characters while one underlying text input captures the keystrokes, so native SMS autofill, the one-time-code keyboard suggestion, and paste all flow into a single value.
Playground
Every control sets a real prop of InputOTPProps. The JSX below updates as you go.
Web
iOS
Android
JSX · InputOTPProps
Variants
6 examples from src/atoms/input-otp/input-otp.md, each rendered live from its own JSX.
Sizes
States
Hover, focus and press are pinned so they can be compared side by side; the rest are real props.
Anatomy
1
Cell
2
Digit
3
Caret
4
Group gap
Dimmed parts appear only in some states or variants.
Props
15 props on InputOTPProps, grouped as they are declared in source. Required props are marked *.
Accessibility and keyboard
Keyboard
Type
Fills the cell and advances
Backspace
Clears and steps back
ArrowLeft
ArrowRight
Moves between cells
Paste
Fills every cell
Semantics
ARIA on web
aria-label
From the docs
A segmented one-time-code field: length cells display the typed characters while one underlying text input captures the keystrokes, so native SMS autofill, the one-time-code keyboard suggestion, and paste all flow into a single value.
Platform skins
The playground's props on each platform: same tree, native shapes, type and touch sizes.
Usage
Because that one input spans the whole row, the caret is pinned to the end of the code: tap any cell and the next character still lands in the first unfilled one, so a keystroke can never drop into the middle of a partly-entered code. It works controlled (value + onChangeText) or uncontrolled (defaultValue, or a bare <InputOTP /> that is typeable out of the box); onComplete fires once the code reaches length characters. Style and shape it with semantic props: groups splits the run into dash-separated chunks, alphanumeric accepts letters as well as digits, and small, large, masked, disabled and autoFocus do what they say.
Tokens
Read from the playground render. Values follow the scheme and the ion hue.
--bg2
--fd
--fm
--ft
--ln2