Universal sharing function for Compose Multiplatform.
Check out the sample project in the /sample directory for complete usage examples.
Nagranie.z.ekranu.2025-11-3.o.12.17.19.2.mov
- Cross-platform compatibility - Single API for both Android and iOS
- Native performance - Uses Android
Intentsystem and iOSUIActivityViewController - File sharing support - Share local files with proper MIME type detection
- Customizable options - Platform-specific customization options
- Compose integration - Built with Compose Multiplatform for modern UI development
@Composable
fun ShareButton() {
val share = rememberShare()
Button(
onClick = {
share(
data = "file:///path/to/your/file.jpg",
options = SharingOptions(
android = AndroidSharingOptions(
dialogTitle = "Share Image",
mimeType = "image/jpeg"
),
ios = IosSharingOptions(
anchor = Anchor(x = 100f, y = 100f, width = 200f, height = 50f)
)
)
)
}
) {
Text("Share")
}
}For installation instructions visit our dedicated document.
Check out our dedicated documentation page for the API reference.
We welcome contributions! Please feel free to submit a pull request.
Since 2012 Software Mansion is a software agency with experience in building web and mobile apps. We are Core React Native Contributors and experts in dealing with all kinds of React Native issues. We can help you build your next dream product – Hire us.
Made by @software-mansion and
community 💛