Skip to main content
239

Search Lumen

Find components, APIs, guides, and recipes.

GitHub
Themes
Android docs
ActionsAndroid

Selection bar

Show bulk actions for selected items.

Public APILumenSelectionBarAndroid / Compose

Native example

Use Selection bar

Pin it to the bottom of the list screen while items are selected.

Selection bar rendered in the Android phone emulator Lumen playground
Captured exampleAndroid phone emulatorView dark appearance
kotlin
import androidx.compose.runtime.*
import com.santi020k.lumen.*

@Composable
fun FileSelectionBar() {
    var selected by remember { mutableStateOf(setOf("report", "notes", "logo")) }
    LumenSelectionBar(
        count = selected.size,
        onClear = { selected = emptySet() }
    ) {
        LumenButton(
            onClick = { selected = emptySet() },
            intent = LumenButtonIntent.Secondary,
            size = LumenControlSize.Sm
        ) { LumenText("Archive") }
    }
}
Android
A bulk-action bar that shows the selected count with archive and clear actions and hides at zero.

Reference

Public API

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

APIValues or typeDefaultDescription
count / onClear / labelselected items / clear callback / count textrequired / none / {count} selectedPin it to the bottom of the list screen while items are selected.

Native behavior

Design and accessibility

When to use it

Pin it to the bottom of the list screen while items are selected.

Accessibility

Hidden at zero; count changes are announced politely.

Shared component

Available on other platforms

React NativeApple / SwiftUI Web
Android docsCompose module