SigningEmbed component from @sajn/embed-vue. The component wraps createSigningEmbed from @sajn/embed-js.
Before you begin
- Turn on embedding for your organization and add your domain to the embed domains. For more information, see Add your embed domains.
- Create and send the document, and note the party’s
id. For the steps, see Embed the signing page. - Vue 3.3 or later.
Install the package
Create a session on your server
Your Vue code never calls the sajn API. Add a server endpoint that creates an embed session and returns itsclientSecret. In Nuxt, use a server route:
Show the signing page
RenderSigningEmbed with a fetch-client-secret function:
div that holds the frame. A class or style attribute applies to that div, so give it a height there. The component creates the frame when it mounts in the browser, so server rendering in Nuxt outputs only the empty div.
Props
Events
For when each event fires, see Events.
EmbedIds is { documentId: string; partyId: string; externalId: string | null }.
Update the frame
The component watchesappearance and locale, and a change updates the open frame without reloading it:
host, title, and fallback-height only when it mounts. To apply a change to one of them, change the component’s key, which mounts a new frame with a new session. Features can’t change from the browser. To change them, create a new session.
TypeScript types
The package exports its types:Troubleshooting
@errorgetsbootstrap_timeout, and the frame is blank: the browser most likely refused the frame. Check the session’soriginsagainst the page’s exact origin, and your page’s ownframe-srcpolicy. For every cause, see Fix a blank frame.@errorgetsclient_secret_failed: thefetch-client-secretfunction threw an error, or returned something other than theclientSecretstring.- The frame is 600px high and doesn’t fill the container: the container has no height. Set one with
classorstyle.
Next steps
Embedded signing
See the session request, the appearance, the events, and the error codes.
Embed signing in your app
Run the whole flow from server to frame.

