FLXTextFieldGroup draws a single shared box around an optional leading addon, the field, and an optional trailing addon. FLXTextFieldGroupAddon tints its content with the theme's muted foreground, for an icon, a Text prefix/suffix, or a Button.
There are two initializers: leading-only, and leading-and-trailing. With a single trailing closure, FLXTextFieldGroup(...) { ... } always binds to leading.
Secure variant
FLXSecureTextFieldGroup draws the same box, wrapping FLXSecureField instead of FLXTextField.
FLXTextFieldGroup is for search inside content, like filtering a list or a card. For suggestions, scopes, and empty results, see Search. For the screen's search, use .searchable(text:): the system places the field and applies Liquid Glass. On iPhone it sits in the bottom toolbar, and .searchToolbarBehavior(.minimize) collapses it into a button.
@State private var query = ""NavigationStack { List(["Ana", "Bruno", "Carla"], id: \.self) { name in Text(name) } .navigationTitle("Contacts")}.searchable(text: $query)
Custom styling
FLXTextFieldGroupStyle is an FLX protocol. Override it for a subtree via .flxTextFieldGroupStyle(_:):