Skip to main content
161

Search Lumen

Find components, APIs, guides, and recipes.

GitHub
Android docs
FeedbackAndroid

Banner

Present a structured semantic notice with optional actions and dismissal.

Public APILumenBannerAndroid / Compose

Native example

Use Banner

Use for persistent inline notices with optional action and dismissal. Prefer Alert for compact semantic content without banner structure.

Banner rendered in the Android phone emulator Lumen playground
Verified runtime captureAndroid phone emulator
kotlin
LumenBanner(
    title = "Workspace assigned automatically",
    description = "Moved the app to Documentation.",
    variant = LumenBannerVariant.Accent,
    onDismiss = ::dismissAssignment
)

Reference

Public API

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

APIValues or typeDefaultDescription
titleStringRequiredNames the notice.
descriptionString?nullAdds supporting detail.
variantdefault · accent · destructive · success · warningdefaultSelects semantic presentation.
onDismiss(() -> Void)?nullAdds a labeled dismiss action.
actions(@Composable () -> Unit)?nullProvides optional inline actions.

Native behavior

Design and accessibility

When to use it

Use for persistent inline notices with optional action and dismissal. Prefer Alert for compact semantic content without banner structure.

Accessibility

A banner is inline content, not a live announcement. The application decides whether newly inserted content needs a platform announcement.

Shared component

Available on other platforms

React NativeApple / SwiftUI
Android docsCompose module