One-time code input
Introduction
Section titled “Introduction”OneTimeCodeInput subclasses TextInput, forces type="text", and sets autocomplete="one-time-code" so mobile browsers and password managers can offer SMS/app OTP autofill. All TextInput helpers apply — mask, length, numeric, revealable (rarely useful), trim, and validation.
Each variation below includes a detailed explanation, the fluent API to paste into your schema, and light/dark screenshots of the rendered control.
Basic one-time code
Section titled “Basic one-time code”Minimal OTP field ready for authenticator or SMS codes.
OneTimeCodeInput.make('otp') .label('Authentication code') .placeholder('123456')

Fixed length PIN
Section titled “Fixed length PIN”.length(6) registers exact-length intent; combine with .numeric() and .mask() for digit-only UX.
OneTimeCodeInput.make('code') .label('Code') .length(6) .numeric() .mask('999999')

Required OTP
Section titled “Required OTP”Require the code on submit and autofocus for keyboard-first flows.
OneTimeCodeInput.make('otp') .label('One-time code') .required() .autofocus() .autocomplete('one-time-code')

Trim pasted codes
Section titled “Trim pasted codes”Users often paste codes with spaces — .trim() and .strip_characters(' ') clean dehydrate state.
OneTimeCodeInput.make('otp') .label('Code') .trim() .strip_characters(' ') .length(6)

Closures work on .label(), .helper_text(), .placeholder(), .visible(), .disabled(), and .required() where applicable — see Form closures.