@sajn/embed-react package. The @sajn/embed-react package provides a React component for embedding the signing experience.
Before you begin
- Turn on embedding for your organization and add your domain to the allowlist. For more information, see Embedded signing.
- On your server, create the document and read the party’s token from the
signingUrlthatGET /api/v1/documents/DOCUMENT_ID/parties/PARTY_IDreturns. For the steps, see Embed the signing page. Never call the sajn API from the browser, because the request needs your API key.
Demo
Requirements
- React 18.0+ or React 19.0+
Installation
Component
Import
Props
Basic example
Example with every prop
TypeScript types
The package exports all types:SignerCompletedData
SignerRejectedData
CssVars
Next.js
The component is marked with"use client". In the App Router, get the token in a server component and pass it to a client component that renders the embed:
If you’re using the Pages Router, the component works without any additional configuration.
Styling
The component renders an iframe that fills its container. Set dimensions on the parent element:width: 100% and height: 100%.
View a signed document
The package also includesEmbedViewDocument for displaying signed documents in read-only mode.
Import
Props
Basic example
Example with every prop
Next steps
Embedded signing
See the shared options, events, and security model.
Embed signing in your app
Run the whole flow from server to iframe.

