Skip to main content
161

Search Lumen

Find components, APIs, guides, and recipes.

GitHub
Apple docs
FeedbackApple

Toast

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

Public APILumenToastApple / 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 TV · tvOS 16+Apple Vision · visionOS 1+Apple Watch · watchOS 9+

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 iPhone simulator Lumen playground
Verified runtime captureiPhone simulator
swift
LumenToast(
    "Changes saved",
    description: "The workspace is up to date.",
    variant: .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 NativeAndroid / Compose
Apple docsSwiftUI package