Skip to main content
161

Search Lumen

Find components, APIs, guides, and recipes.

GitHub
Android docs
FeedbackAndroid

Toast

Present app-controlled transient native feedback with semantic tone and optional actions.

Public APILumenToastAndroid / Compose

Native example

Use Toast

Use for brief feedback after an operation. Application state owns presentation and timing so navigation and lifecycle behavior remain native.

Toast rendered in the Android phone emulator Lumen playground
Verified runtime captureAndroid phone emulator
kotlin
LumenToast(
    title = "Changes saved",
    description = "The workspace is up to date.",
    variant = LumenBannerVariant.Success,
    onDismiss = ::dismissToast
)

Reference

Public API

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

APIValues or typeDefaultDescription
titleStringRequiredProvides concise feedback.
descriptionString?nilAdds short supporting context.
variantdefault · destructive · success · warningdefaultSelects semantic feedback tone.
actionNative action contentnilProvides one optional recovery action.
onDismissCallback?nilAdds a labeled dismissal action.

Native behavior

Design and accessibility

When to use it

Use for brief feedback after an operation. Application state owns presentation and timing so navigation and lifecycle behavior remain native.

Accessibility

The toast announces concise feedback while optional action and dismissal controls keep independent native labels.

Shared component

Available on other platforms

React NativeApple / SwiftUI
Android docsCompose module