Skip to main content
161

Search Lumen

Find components, APIs, guides, and recipes.

GitHub
Android docs
FeedbackAndroid

Alert dialog

Request a controlled native confirmation with explicit cancel and confirm states.

Public APILumenAlertDialogAndroid / Compose

Native example

Use Alert dialog

Use for short consequential confirmations. Keep visibility and mutation state in the application and reserve destructive styling for irreversible or difficult-to-recover actions.

Alert dialog rendered in the Android phone emulator Lumen playground
Verified runtime captureAndroid phone emulator
kotlin
LumenAlertDialog(
    visible = showConfirmation,
    title = "Delete report?",
    confirmLabel = "Delete",
    destructive = true,
    onConfirm = ::deleteReport,
    onDismiss = { showConfirmation = false }
)

Reference

Public API

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

APIValues or typeDefaultDescription
visibleBooleanRequiredControls native modal presentation.
title / descriptionNative localized textDescription optionalExplains the decision.
confirmLabel / cancelLabelNative localized textCancel label: CancelNames both actions.
destructiveBooleanfalseCommunicates whether the confirm action is destructive.
confirmEnabledBooleantrueControls whether the confirm action can be activated.
confirmLoadingBooleanfalseCommunicates asynchronous confirmation progress.

Native behavior

Design and accessibility

When to use it

Use for short consequential confirmations. Keep visibility and mutation state in the application and reserve destructive styling for irreversible or difficult-to-recover actions.

Accessibility

Native modal focus stays inside the confirmation surface and cancel and confirm remain independently named actions.

Shared component

Available on other platforms

React NativeApple / SwiftUI
Android docsCompose module