Skip to main content
These modifiers tune the behavior of 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
Email input
Numeric input
URL input
This modifier only affects 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
Rounded border style
Plain style
Form with styled fields

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
Search field
Chat input
Multi-field form

autocorrectionDisabled

Disables autocorrection for text input fields.
boolean
default:"true"
Whether autocorrection is disabled. Defaults to true.
Disable autocorrection on a username field
Conditionally disable autocorrection

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).
Submitting a search
Combined with submit label
Moving focus on submit
The submit action is triggered when the user presses the Return key on the keyboard. Use submitLabel to customize the Return key text (e.g., “search”, “done”, “go”).

focused

Binds focus state for programmatic focus control of text input fields.
object
required
Auto-focus a text field
Focus on button tap

See also