When to use it
Use it when options should stay visible. Use a select for long lists in tight space.
Native example
Use it when options should stay visible. Use a select for long lists in tight space.
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 }
)
}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