textfield suggestions?

Asked on 2026-07-06

1 search

If you mean text field suggestions on Apple platforms, WWDC 2024 covered this in What’s new in AppKit and What’s new in SwiftUI.

AppKit

  • In macOS Sequoia, you can provide custom suggestions as people type in a system-standard suggestions menu.
  • It works on any NSTextField, including subclasses like NSSearchField.
  • You enable it by setting the text field’s suggestionsDelegate.
  • The delegate can return suggestions synchronously or asynchronously.
  • It can also customize text completions on highlight and selection.

SwiftUI

  • SwiftUI also added support to add text suggestions to any text field.
  • Suggested completions appear in a dropdown menu.
  • Picking one updates the text field with the selected completion.

Design tips mentioned

  • Keep suggestions relevant to what’s being typed.
  • Make them consistent and predictable.
  • If you provide asynchronous suggestions, put them after immediate suggestions.
  • Keep the list simple and focused on the most important results.

If you want, I can also point you to the specific WWDC session or summarize the API differences between AppKit and SwiftUI.