Genesis
@beta

NativeShareSheet

ShareSheet — sharing one published page (a form, a course, a worksheet) from the phone: its link with Copy and the system share sheet, and a QR code to show someone across the desk. The twin of genesis-ui's `ShareDialog`: the host passes the link and how to draw a QR code (`renderQr`, the same approach as the web; Genesis bundles no QR library), so nothing native is added. Copy goes through `onCopy` (pass expo-clipboard's `setStringAsync`); without it, Copy opens the system share sheet, which has Copy.

packages/ui-native/src/components/share-sheet.tsx

Import
Subpath export: @marktiderman/genesis-ui-native
import { NativeShareSheet } from "@marktiderman/genesis-ui-native";
Components
Auto-generated from TypeScript source via react-docgen-typescript.

NativeShareSheet

PropTypeDefaultDescription
onOpenChange*(open: boolean) => void—
open*boolean—
url*string | null—The public link; null while it is still loading.
descriptionReactNodeAnyone with the link can open it.Default "Anyone with the link can open it."
namestring—Its name, sent with the link to the system share sheet.
nounstringpageWhat it is, in the default title and buttons: "page" (default), "form", "course".
onCopy((text: string) => void | Promise<void>)—Copies text (expo-clipboard's `setStringAsync`). Default: the system share sheet.
renderQr((url: string) => ReactNode)—Draws a QR code for a link. None hides the QR code.
testIDstringnative-share-sheet
titlestring`Share your ${noun}`Default "Share your {noun}".