Skip to main content
239

Search Lumen

Find components, APIs, guides, and recipes.

GitHub
Themes
Apple docs
FormsApple

List box

Pick one or more options from an always-visible list.

Public APILumenListBoxApple / SwiftUISwift product: LumenUI

Apple availability

Supported native targets

Import LumenUI in the target that uses this component. iPad support follows the iOS package baseline and uses native iPad layout behavior.

iPhone · iOS 16+iPad · iPadOS 16+Mac · macOS 13+Apple Vision · visionOS 1+

Native example

Use List box

Use it when options should stay visible. Use a select for long lists in tight space.

List box rendered in the iPhone simulator Lumen playground
Captured exampleiPhone simulatorView dark appearance
swift
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")
        ])
    }
}
Apple
An always-visible reviewer list grouped into Design and Engineering sections with one member selected.

Reference

Public API

The primary shared and platform-specific options exposed by LumenListBox.

APIValues or typeDefaultDescription
options / value / multipleoptions and sections / selected values / multiple selectionrequired / none / falseUse it when options should stay visible.

Native behavior

Design and accessibility

When to use it

Use it when options should stay visible. Use a select for long lists in tight space.

Accessibility

A named list whose options expose selected and disabled states.

Shared component

Available on other platforms

React NativeAndroid / Compose Web
Apple docsSwiftUI package