TextField, SecureField, and TextEditor. keyboardType and submitLabel adjust the on-screen keyboard; textFieldStyle sets the visual chrome; autocorrectionDisabled turns off autocorrect; onSubmit handles Return-key submission; focused binds programmatic focus.
These have no effect on non-input components. For multi-field forms, combine submitLabel("next") with focused to drive focus through fields as the user submits.
keyboardType
Sets the keyboard type for text input fields.string
required
The keyboard type to display. Options:
"default"— standard keyboard"asciiCapable"— ASCII-only keyboard"numbersAndPunctuation"— numbers and punctuation"URL"— optimized for URL entry"numberPad"— numeric keypad (0-9)"phonePad"— phone number pad"namePhonePad"— name and phone number"emailAddress"— optimized for email entry"decimalPad"— numbers with decimal point"twitter"— optimized for Twitter/social (includes @ and #)"webSearch"— optimized for web search"asciiCapableNumberPad"— ASCII-capable numeric keypad
TextField and TextEditor components. It has no effect on non-input components. The keyboard type is a hint to the system — the actual keyboard displayed may vary by platform and locale.
textFieldStyle
Sets the visual style for a TextField."roundedBorder" | "plain" | "automatic"
required
The text field style:
"roundedBorder"— displays a rounded border around the field"plain"— no visible border or background"automatic"— uses the platform default style
submitLabel
Sets the keyboard return key label for text input fields.string
required
The label displayed on the keyboard’s return key:
"done"— indicates completion"go"— navigates to a URL or performs an action"send"— sends a message"join"— joins a group or session"route"— starts navigation"search"— performs a search"next"— moves to the next field"continue"— continues a multi-step process"return"— the default return key
autocorrectionDisabled
Disables autocorrection for text input fields.boolean
default:"true"
Whether autocorrection is disabled. Defaults to
true.onSubmit
Runs an action when the user submits a text field.() => void
required
A callback that runs when the user submits the text field (e.g., presses the Return key).
focused
Binds focus state for programmatic focus control of text input fields.object
required
See also
- TextField — text input component
- SecureField — password input component
- TextEditor — multi-line text editor
- disabled — disable a text field