This documentation is available as Markdown for AI agents and LLMs. See the full Markdown index or append .md to any documentation URL.
TextField
A SwiftUI TextField component for text input.
iOS
tvOS
Recommended version:
~55.0.17
Expo UI TextField matches the official SwiftUI TextField API and supports single-line and multiline input, keyboard configuration, submit handling, and an imperative ref for programmatic control.
Set axis="vertical" to allow the text field to expand vertically. Use the lineLimit modifier to control the visible line count. When using Host matchContents, add fixedSize({ horizontal: false, vertical: true }) so the text field accepts the parent's width while using its ideal height.
MultilineTextFieldExample.tsx
import{ useState }from'react';import{Host,TextField}from'@expo/ui/swift-ui';import{ lineLimit, fixedSize }from'@expo/ui/swift-ui/modifiers';exportdefaultfunctionMultilineTextFieldExample(){const[value, setValue]=useState('');return(<HostmatchContents><TextFieldaxis="vertical"placeholder="Tell us about yourself..."onValueChange={setValue}modifiers={[lineLimit(5),fixedSize({ horizontal:false, vertical:true})]}/></Host>);}
Keyboard type
Use the keyboardType modifier to display a specific keyboard layout.