Web components
The same components as custom elements, for pages without React.
Use
<script type="module" src="/monoclan-elements.js"></script>
<sfs-signing-form client-secret="cs_live_…" locale="ru" primary="#5b3ea8"></sfs-signing-form>
| Element | Component |
|---|---|
sfs-signing-form |
SigningForm |
sfs-document-status |
DocumentStatus |
sfs-send-flow |
SendFlow |
sfs-approval-card |
ApprovalCard (agent-name, summary) |
sfs-document-editor |
DocumentEditor |
sfs-document-card |
DocumentCard (set the document property) |
Attributes: client-secret, api-url, locale, theme, color-scheme, primary. Properties: appearance, messages.
Events
Callbacks arrive as DOM events that bubble out of the element:
document.querySelector('sfs-signing-form').addEventListener('sfs-complete', (e) => console.log(e.detail));
sfs-complete, sfs-decline, sfs-sent, sfs-change, sfs-context, sfs-review, sfs-dismiss, sfs-open, sfs-error.
Isolation
Each element draws inside its own shadow root: your page's CSS cannot reach in and ours cannot leak out. Fonts are declared once on the page.