Skip to main content
239

Search Lumen

Find components, APIs, guides, and recipes.

GitHub
Themes
React Native docs
AIReact Native

Message actions

Copy, retry, and rate one message.

Public APILumenMessageActionsReact Native

Native example

Use Message actions

Pass disabled while streaming; Copy stays available. Retry and rating only report intent.

Message actions rendered in the Expo web renderer Lumen playground

Captured exampleExpo web renderer

Open interactive preview
Open the Message actions demo
tsx
import * as Clipboard from 'expo-clipboard'
import { useState } from 'react'
import { LumenMessageActions, type LumenMessageFeedback } from '@santi020k/lumen-react-native'

export function AnswerActions({ id, text, onRetry }: { id: string; text: string; onRetry: (id: string) => void }) {
  const [feedback, setFeedback] = useState<LumenMessageFeedback | null>(null)

  return (
    <LumenMessageActions
      copyValue={text}
      feedback={feedback}
      messageId={id}
      onCopy={({ value }) => Clipboard.setStringAsync(value)}
      onFeedback={(_, value) => setFeedback(value)}
      onRetry={onRetry}
      retry
    />
  )
}
React Native
Copy through `expo-clipboard`, retry, and the good/bad rating pair under an answer.

Reference

Public API

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

APIValues or typeDefaultDescription
messageId / retry / showFeedbackowning message / show retry / show ratingrequired / false / truePass disabled while streaming; Copy stays available.

Native behavior

Design and accessibility

When to use it

Pass disabled while streaming; Copy stays available. Retry and rating only report intent.

Accessibility

Named group; rating buttons expose selected state; copy results announce politely.

Shared component

Available on other platforms

Apple / SwiftUIAndroid / Compose Web
React Native docsNative primitives