Skip to main content
239

Search Lumen

Find components, APIs, guides, and recipes.

GitHub
Themes
Android docs
FormsAndroid

List box

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

Public APILumenListBoxAndroid / Compose

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 Android phone emulator Lumen playground
Captured exampleAndroid phone emulatorView dark appearance
kotlin
private val channels = listOf(
    LumenListBoxOption("Email", "email", section = "Messaging", description = "Daily digest at 9:00"),
    LumenListBoxOption("Push notification", "push", section = "Messaging"),
    LumenListBoxOption("SMS", "sms", disabled = true, section = "Messaging", description = "Needs a verified number"),
    LumenListBoxOption("Slack", "slack", section = "Integrations")
)

@Composable
fun NotificationChannelPicker() {
    var channel by rememberSaveable { mutableStateOf(listOf("push")) }
    LumenListBox(
        label = "Notification channel",
        options = channels,
        value = channel,
        onValueChange = { channel = it }
    )
}
Android
An always-visible notification channel list grouped into sections, with one selected option and a disabled option that explains why.

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 NativeApple / SwiftUI Web
Android docsCompose module