Text Field OTP
Live preview and documentation for the Text Field OTP component.
Preview
componentPreview.loading
About
A verification code (OTP) field, with separate visual cells per digit. It uses a single invisible TextField behind the cells to avoid keyboard flicker when moving between digits.
length: number of digits (default 6)separatorAfterIndex: inserts a separator (dash) after that index, e.g.2groups digits as[0][1][2] — [3][4][5]separatorStrokeVisible:true(default) shows the dash;falsekeeps only the spacingonChanged/onCompleted: called on every change / when all digits are filledhasError: paints an error border on the cellsenabled:falsedisables and dims the cellsplaceholder: ghost text shown in empty cellsneutralFlatCells: soft neutral background with no shadow (used in placeholder/sheet contexts)suppressCellShadow/suppressFocusBorder: remove the cell shadow / focus ring, keeping everything elsecellFillColor: overrides the fill color (ignored ifneutralFlatCellsis set)keyboardType/inputFormatters/textCapitalization: keyboard customization (default: digits only)semanticLabel: accessible name for the hidden field
Last updated on 08/23/2026

