Skip to main content
161

Search Lumen

Find components, APIs, guides, and recipes.

GitHub
Android docs
ActionsAndroid

Share button

Open the operating system share surface from a token-aware native action.

Public APILumenShareButtonAndroid / Compose

Native example

Use Share button

Use to share application-owned text, URLs, or files through the operating system. Keep content generation, file permissions, completion feedback, and error handling in the application.

Share button rendered in the Android phone emulator Lumen playground
Verified runtime captureAndroid phone emulator
kotlin
LumenShareButton(
    payload = LumenSharePayload(text = reportText),
    chooserTitle = "Share report"
)

Reference

Public API

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

APIValues or typeDefaultDescription
payloadLumenSharePayloadRequiredSupplies application-owned share content.
chooserTitleStringRequiredConfigures the native share presentation.
labelNative localized textShareNames the trigger action.
onFailurePlatform callbackNo-opLets the application report sharing outcomes where the platform exposes them.

Native behavior

Design and accessibility

When to use it

Use to share application-owned text, URLs, or files through the operating system. Keep content generation, file permissions, completion feedback, and error handling in the application.

Accessibility

The trigger remains a native labeled button and destination selection is delegated to the operating system share surface.

Shared component

Available on other platforms

React NativeApple / SwiftUI
Android docsCompose module