@sigx/lynx-share
v0.9.2
Published
Native share dialog for sigx-lynx
Maintainers
Readme
@sigx/lynx-share
Native share dialog for sigx-lynx. UIActivityViewController on iOS, Intent.ACTION_SEND chooser on Android.
📚 Documentation
Full guides, API reference and live examples → https://sigx.dev/lynx/modules/share/overview/
Install
pnpm add @sigx/lynx-sharesigx prebuild auto-discovers and links the native module. No special permissions on either platform.
Usage
import { Share } from '@sigx/lynx-share';
Share.share({
title: 'Check this out',
message: 'Built with sigx-lynx!',
url: 'https://sigx.dev',
});API
| Method | Notes |
| ------------------------------------- | -------------------------------------------------------------------------------------------------- |
| share(options: ShareOptions): void | Sync — fire-and-forget. The share sheet dismissal isn't surfaced as a callback. |
| isAvailable(): boolean | Whether the native module is registered in the current build. |
interface ShareOptions {
title?: string;
message?: string;
url?: string;
}Gotchas
- Sharing files isn't directly supported —
urlis treated as a string (web URL). For local file sharing, the native side would need to handle file URIs and FileProvider authority, which isn't wired here yet. - No completion callback. If you need to know whether the user actually shared (vs. cancelled the sheet), you'll need to extend the native module with
UIActivityViewController.completionWithItemsHandler(iOS) /ACTION_SENDresult handling (Android, harder — there's no clean signal).
