Skip to main content
161

Search Lumen

Find components, APIs, guides, and recipes.

GitHub
Apple docs
ActionsApple

Share button

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

Public APILumenShareButtonApple / SwiftUISwift product: LumenUI

Apple availability

Supported native targets

Import LumenUI in the target that uses this component. iPad support follows the iOS package baseline and uses native iPad layout behavior.

iPhone · iOS 16+iPad · iPadOS 16+Mac · macOS 13+Apple Vision · visionOS 1+Apple Watch · watchOS 9+

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 iPhone simulator Lumen playground
Verified runtime captureiPhone simulator
swift
LumenShareButton("Share report", item: reportText)

Reference

Public API

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

APIValues or typeDefaultDescription
itemTransferableRequiredSupplies application-owned share content.
Native share titleSystem-providedSystem-providedConfigures the native share presentation.
labelNative localized textShareNames the trigger action.
Native ShareLink resultPlatform 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 NativeAndroid / Compose
Apple docsSwiftUI package