Skip to main content
239

Search Lumen

Find components, APIs, guides, and recipes.

GitHub
Themes
Apple docs
ActionsApple

Selection bar

Show bulk actions for selected items.

Public APILumenSelectionBarApple / 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 Selection bar

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

Selection bar rendered in the iPhone simulator Lumen playground
Captured exampleiPhone simulatorView dark appearance
swift
import LumenUI
import SwiftUI

struct SelectionBarExample: View {
    @State private var selected: Set<String> = ["brief", "notes", "photo"]

    var body: some View {
        List(["brief", "notes", "photo"], id: \.self) { Text(verbatim: $0) }
            .safeAreaInset(edge: .bottom) {
                LumenSelectionBar(count: selected.count, onClear: { selected.removeAll() }) {
                    LumenButton("Archive", intent: .secondary, size: .sm) {}
                    LumenButton("Delete", intent: .quiet, tone: .danger, size: .sm) {}
                }
                .padding(.horizontal, LumenSpacing.lg)
            }
    }
}
Apple
A bulk-action bar pinned above the bottom safe area that counts selected files and clears them.

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 NativeAndroid / Compose Web
Apple docsSwiftUI package