Skip to content

feat(sdk): <TurboSignForm> embed widget (React + web component) wrapping the completion postMessage #78

Description

@nicolasiscoding

Summary

Ship a <TurboSignForm> React component + a framework-agnostic web component that wraps the embedded signing iframe, so integrators don't hand-roll the postMessage plumbing. This is the piece most competitors ship (DocuSeal <DocusealForm>, Documenso @documenso/embed-react, Dropbox Sign hellosign-embedded, PandaDoc pandadoc-signing) that a bare-iframe integration lacks.

What it does

  • Takes an embedUrl (from TurboSign.createEmbeddedSignature(...) → recipients[].embedUrl) and renders the iframe with sensible sizing.
  • Listens for the turbosign:completed postMessage and exposes callbacks: onCompleted({ documentId }), and (when we add them) onDeclined / onError.
  • Bakes in the origin check (only accept messages from the known TurboSign origin) — the BoldSign pattern — so integrators can't forget it.
  • Ships as @turbodocx/embed-react (React) + a <turbosign-form> web component for other frameworks.

Context

Fast-follow to the createEmbeddedSignature convenience method (SDK PR #77). Competitive research: DocuSeal/Documenso/Dropbox Sign/PandaDoc all provide a widget; only BoldSign leaves you on a bare iframe.

Acceptance

  • <TurboSignForm embedUrl onCompleted /> renders the iframe and fires onCompleted on turbosign:completed, with the origin pinned.
  • A framework-agnostic web component with the same behavior.
  • Docs + an example using it (replace the hand-rolled listener in examples/embedded-web-app).

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions