Skip to main content
239

Search Lumen

Find components, APIs, guides, and recipes.

GitHub
Themes
Android docs
AIAndroid

Message actions

Copy, retry, and rate one message.

Public APILumenMessageActionsAndroid / Compose

Native example

Use Message actions

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

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

@Composable
fun AnswerActionsExample(answer: String, regenerate: (String) -> Unit) {
    var feedback by remember { mutableStateOf<LumenMessageFeedback?>(null) }

    LumenMessageActions(
        messageId = "answer-1",
        copyValue = answer,
        retry = true,
        onRetry = regenerate,
        feedback = feedback,
        onFeedback = { _, next -> feedback = next }
    )
}
Android
Copy, retry, and a good or bad rating under an assistant reply; pressing the current rating clears it.

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

React NativeApple / SwiftUI Web
Android docsCompose module