TextField is the standard single-line input. SecureField is the same shape but obscures its contents for passwords and other sensitive data. TextEditor is a multi-line editing area for longer-form text.
All three follow the same controlled-input pattern: pass the current text value and a setText callback. Style them with shared modifiers like .textFieldStyle(), .keyboardType(), and .autocorrectionDisabled().
TextField
A single-line text input field with an optional placeholder.string
Placeholder text displayed when the field is empty.
string
required
The current text value of the field.
(text: string) => void
required
Callback invoked when the user types. Use this to update your state.
SecureField
A text input that obscures its contents, used for passwords and sensitive data.string
Placeholder text displayed when the field is empty.
string
required
The current text value of the field (displayed as masked characters).
(text: string) => void
required
Callback invoked when the user types. Use this to update your state.
TextEditor
A multi-line text editing area for longer form text input.string
required
The current text content displayed in the editor.
(text: string) => void
required
Callback invoked when the user edits the text. Use this to update your state.