Skip to main content
161

Search Lumen

Find components, APIs, guides, and recipes.

GitHub
Android docs
FeedbackAndroid

Alert

Present inline native feedback using shared neutral, destructive, success, and warning treatments.

Public APILumenAlertAndroid / Compose

Native example

Use Alert

Use default for neutral notices and semantic variants for outcomes or risk. Keep the message actionable and avoid presenting routine information as an alert.

Alert rendered in the Android phone emulator Lumen playground
Verified runtime captureAndroid phone emulator
kotlin
LumenAlert(variant = LumenAlertVariant.Success) {
    Text("Profile synced")
}

Reference

Public API

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

APIValues or typeDefaultDescription
variantdefault · destructive · success · warningdefaultSelects the semantic foreground, border, and tint.
contentNative contentRequiredProvides alert content.
modifierNative layout APIControls placement and sizing.
TextPlatform text compositionReact Native uses explicit text roles because View does not inherit text color.

Native behavior

Design and accessibility

When to use it

Use default for neutral notices and semantic variants for outcomes or risk. Keep the message actionable and avoid presenting routine information as an alert.

Accessibility

An alert is a styled container, not an automatic live announcement. Applications decide when asynchronous content needs a platform announcement.

Shared component

Available on other platforms

React NativeApple / SwiftUI
Android docsCompose module