TextField
Build single-line input with keyboard traits, icons, submission, and accessories.
TextField is the single-line text input. Its Text property supports two-way binding for editable ViewModel state:
LeadingIcon and TrailingIcon accept local symbol, bundle, or data image sources. The trailing icon shares its native slot with ClearButton; when both are set, the icon wins. Remote URLs are only supported in the full Image control.
Keyboard behavior
Keyboard traits are hints to iOS, not validation rules:
Keyboardchooses a suitable keyboard layout, such as email, URL, phone, or numeric input.ContentKindidentifies the semantic value so the system can offer appropriate autofill.CapitalizationandAutocorrectiontune text entry behavior.ReturnKeychanges the return-key label.RequiresTextdisables the return key while the field is empty.KeyboardLookrequests the default, light, or dark keyboard appearance.
Use SubmitCommand to handle the return key:
Set SubmitCommandParameter when the command needs context beyond the field's bound text.
TextChanged is available for local, immediate reactions. Prefer binding for application state so programmatic updates and typed input follow the same path.
Clear buttons and accessories
ClearButton controls when the built-in clear button appears. Clearing keeps focus, updates Text, and invokes TextChanged.
KeyboardToolbar adds a native bar above the keyboard with a Done button and, depending on its value, previous and next controls. For a fully custom accessory, set KeyboardAccessory to a SkeleKit view. A custom accessory takes precedence over the toolbar and belongs to one field.
Use SecureField for passwords and TextEditor for multi-line input. Binding modes and update triggers are covered in MVVM and binding.