React components
The signing screen, the sender's flow, a document's status and an editor, running inside your product with a session secret.
Install
npm install @monoclan/react
import '@monoclan/react/styles.css';
import { SigningForm } from '@monoclan/react';
The packages are private; your account manager gives your team access. Styles are scoped under .sfs-root and never touch the rest of your page.
SigningForm
The signer's screen: their details, the document with their places numbered, the signature, done.
<SigningForm
clientSecret={secret} // a signing session
locale="ru" // or let the signer's language decide
appearance={{ variables: { colorPrimary: '#5b3ea8' } }}
onComplete={(view) => …}
onDecline={(view) => …}
onContextChange={(ctx) => …} // what the signer sees, for an agent beside them
/>
On phones the document reads at screen width and the signature opens in a sheet; on wide screens the label stands beside the page.
DocumentStatus
Where a document stands, who has done what, remind and withdraw (with the session's features), the signed PDF, and the history.
<DocumentStatus clientSecret={viewingSecret} onChange={(view) => …} onBeforeVoid={async () => confirm('Withdraw?')} />
DocumentCard
One document in a list. It needs no session: pass the document your backend fetched.
{docs.map((d) => <DocumentCard key={d.id} document={d} onOpen={open} />)}
SendFlow
The sender's side: who signs, the sender's fields numbered on the page, the message, an optional text editor, and one button that leads to the next missing thing and finally sends.
<SendFlow clientSecret={editingSecret} onBeforeSend={async (view) => true} onSent={(view) => …} />
onBeforeSend gives your product the last word: return false to stop.
ApprovalCard
An agent prepared a draft; the card says what it did, who it goes to and what still blocks it, and sends only on a person's click.
<ApprovalCard clientSecret={editingSecret} agentName="Claude" summary="Filled in the date and fee." onReview={openSendFlow} />
DocumentEditor
The draft's text, editable in place. Small edits keep the Word formatting exactly; moving a field rewrites the paragraph and keeps its style and numbering.
Agent context
Every component reports what the person sees through onContextChange: the document, the step, the field they are in, the blocks in view and the text they selected, by block id, under 8 KB, never signatures or other signers' values. Give it to your agent so "make this clause shorter" means the clause on screen.