When to use it
Use it for units, domains, and inline actions. Keep addon text short.
Join a text field with prefix or suffix text, an icon, or a button in one frame.
Apple availability
Import LumenUI in the target that uses this component. iPad support follows the iOS package baseline and uses native iPad layout behavior.
Native example
Use it for units, domains, and inline actions. Keep addon text short.
import LumenUI
import SwiftUI
struct InputGroupExample: View {
@State private var site = "lumen"
@State private var query = ""
var body: some View {
VStack(alignment: .leading, spacing: LumenSpacing.md) {
LumenInputGroup("Website", text: $site, placeholder: "your-site",
leadingText: "https://", trailingText: ".com")
LumenInputGroup("Search projects", text: $query, placeholder: "Search projects", leading: {
LumenIcon(name: .search, size: .sm)
})
}
}
}Reference
The primary shared and platform-specific options exposed by LumenInputGroup.
| API | Values or type | Default | Description |
|---|---|---|---|
| leading / trailing / invalid | leading addon / trailing addon / error frame | none / none / false | Use it for units, domains, and inline actions. |
Native behavior
Use it for units, domains, and inline actions. Keep addon text short.
The field keeps its own name; addon buttons keep their own names.
Shared component