Skip to main content
239

Search Lumen

Find components, APIs, guides, and recipes.

GitHub
Themes
Apple docs
AIApple

Stream message

Show an assistant reply with one concise status announcement.

Public APILumenStreamMessageApple / 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 Stream message

Update statusLabel with the status, such as "Writing…" then "Done". Put message actions in actions and source citations in sources.

Stream message rendered in the iPhone simulator Lumen playground
Captured exampleiPhone simulatorView dark appearance
swift
import LumenUI
import SwiftUI

struct ReplyExample: View {
    let text: String
    let isStreaming: Bool

    var body: some View {
        LumenStreamMessage(status: isStreaming ? .streaming : .complete,
                           statusLabel: isStreaming ? "Writing a response…" : "Response complete") {
            Text(verbatim: text)
        } sources: {
            LumenSourceCitation("Release notes", href: "https://lumen.santi020k.com/docs")
        }
    }
}
Apple
An assistant reply without a bubble, with a polite status line, optional actions and sources.

Reference

Public API

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

APIValues or typeDefaultDescription
status / statusLabel / labelstream status / announced text / accessible nameidle / required / AssistantUpdate statusLabel with the status, such as "Writing…" then "Done".

Native behavior

Design and accessibility

When to use it

Update statusLabel with the status, such as "Writing…" then "Done". Put message actions in actions and source citations in sources.

Accessibility

Announces the status label once per change; streamed text never announces.

Shared component

Available on other platforms

React NativeAndroid / Compose Web
Apple docsSwiftUI package