Skip to main content
239

Search Lumen

Find components, APIs, guides, and recipes.

GitHub
Themes
React Native docs
AIReact Native

Message

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

Public APILumenMessageReact Native

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 Expo web renderer Lumen playground

Captured exampleExpo web renderer

Open interactive preview
Open the Message demo
tsx
import { LumenAvatar, LumenMessage } from '@santi020k/lumen-react-native'
import { View } from 'react-native'

export function Conversation() {
  return (
    <View style={{ gap: 12 }}>
      <LumenMessage avatar={<LumenAvatar fallback="AI" size="sm" />}>
        Hi! I can help you plan the launch checklist.
      </LumenMessage>
      <LumenMessage from="user">Start with the release notes, then the migration guide.</LumenMessage>
    </View>
  )
}
React Native
A short exchange where the assistant bubble carries an avatar and the user bubble sits at the trailing edge.

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

Apple / SwiftUIAndroid / Compose Web
React Native docsNative primitives