Skip to main content
239

Search Lumen

Find components, APIs, guides, and recipes.

GitHub
Themes
Android docs
AIAndroid

Message

Show one assistant or user chat message aligned to its sender.

Public APILumenMessageAndroid / Compose

Native example

Use Message

Assistant messages sit on surface-muted at the leading edge; user messages sit on brand-soft at the trailing edge. Pass an avatar for multi-person threads.

Message rendered in the Android phone emulator Lumen playground
Captured exampleAndroid phone emulatorView dark appearance
kotlin
import androidx.compose.foundation.layout.*
import androidx.compose.material3.Text
import androidx.compose.runtime.*
import com.santi020k.lumen.*

@Composable
fun ConversationExample() {
    Column(verticalArrangement = Arrangement.spacedBy(LumenSpacing.Md)) {
        LumenMessage(avatar = { LumenAvatar(fallback = "AI", size = LumenAvatarSize.Sm) }) {
            Text("Hi! I can summarize documents and draft replies.")
        }
        LumenMessage(from = LumenMessageSender.User) {
            Text("Summarize the release notes in two sentences.")
        }
    }
}
Android
One chat bubble, muted for the assistant on the leading edge and brand-tinted for the person on the trailing edge, with an optional avatar on the outer side.

Reference

Public API

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

APIValues or typeDefaultDescription
from / avatarsender / optional leading contentassistant / noneAssistant messages sit on surface-muted at the leading edge; user messages sit on brand-soft at the trailing edge.

Native behavior

Design and accessibility

When to use it

Assistant messages sit on surface-muted at the leading edge; user messages sit on brand-soft at the trailing edge. Pass an avatar for multi-person threads.

Accessibility

Content stays in reading order; nested links and actions remain reachable.

Shared component

Available on other platforms

React NativeApple / SwiftUI Web
Android docsCompose module