React
Use the @subnoto/embed-react package to render the signing UI in a React app. You pass the iframe token (and optional host); the component builds the embed URL for you.
Installation
pnpm add @subnoto/embed-react# or npm install @subnoto/embed-reactRequires React 17+.
Getting the token
Create the iframe token on your backend and pass it to the client. See Iframe token for the API and parameters.
Using SignEmbed
import { SignEmbed } from "@subnoto/embed-react";
function SigningView({ iframeToken, host }: { iframeToken: string; host?: string }) { return ( <div style={{ width: "100%", height: "400px" }}> <SignEmbed token={iframeToken} host={host} title="Subnoto signing" className="my-sign-embed" /> </div> );}Props: token (required), host (optional, default https://app.subnoto.com), title, className. You can also pass a pre-built URL via iframeUrl instead of token and host. Give the embed a sized container so the iframe can fill it.
For a custom embed base URL (e.g. SUBNOTO_EMBED_BASE_URL), have your backend return both the token and the host and pass them to SignEmbed.