When to use it
Use it when options should stay visible. Use a select for long lists in tight space.
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 when options should stay visible. Use a select for long lists in tight space.
import LumenUI
import SwiftUI
struct ReviewerPicker: View {
@State private var reviewers: Set<String> = ["amina"]
var body: some View {
LumenListBox("Reviewers", selection: $reviewers, options: [
LumenListBoxOption("Amina", value: "amina", section: "Design"),
LumenListBoxOption("Luca", value: "luca", section: "Design"),
LumenListBoxOption("Theo", value: "theo", section: "Engineering", description: "Engineering lead"),
LumenListBoxOption("Priya", value: "priya", disabled: true, section: "Engineering",
description: "Out until Monday")
])
}
}Reference
The primary shared and platform-specific options exposed by LumenListBox.
| API | Values or type | Default | Description |
|---|---|---|---|
| options / value / multiple | options and sections / selected values / multiple selection | required / none / false | Use it when options should stay visible. |
Native behavior
Use it when options should stay visible. Use a select for long lists in tight space.
A named list whose options expose selected and disabled states.
Shared component