Genesis
@stable

ShareDialog

Sharing one published page (a form, a course, a worksheet), as Google Forms' Send step: its link with Copy, a QR code (and a printable poster when the host has one), an `<iframe>` to embed it on a website, and a builder for prefilled links (`?location=…&staff=…`, or whatever the host offers). Generic: the host passes the link, how to draw a QR code, and the prefill choices.

packages/ui/src/components/resource/ShareDialog.tsx

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

ShareDialog

Sharing one published page (a form, a course, a worksheet), as Google Forms' Send step: its link with Copy, a QR code (and a printable poster when the host has one), an `<iframe>` to embed it on a website, and a builder for prefilled links (`?location=…&staff=…`, or whatever the host offers). Generic: the host passes the link, how to draw a QR code, and the prefill choices.

PropTypeDefaultDescription
name*string—Its name, for the embed's accessible title.
onOpenChange*(open: boolean) => void—
open*boolean—
url*string | null—The public link; null while it is still loading.
defaultTabenumlinkThe tab it opens on (each time it opens). Default "link".
descriptionReactNodeAnyone with the link can open it.Default "Anyone with the link can open it."
nounstringpageWhat it is, in the default title and buttons: "page" (default), "form", "course".
posterUrl((url: string, prefill: Record<string, string>) => string | null)—A printable poster for a link (the base link, or a prefilled one), when the host has one.
prefillreadonly PrefillChoice[][]The search params a prefilled link may set, each with its choices. None hides the builder.
prefillNoteReactNode—Said under the prefilled-link builder (what a prefilled link does).
renderQr((url: string) => ReactNode)—Draws a QR code for a link.
titlestring`Share your ${noun}`Default "Share your {noun}".