Document options
Control how the document is displayed and what’s required:View options
Control how the document is displayed usingviewOptions.layout:
print(default) - Fixed page width, displays document as it printsweb- Content reflows to fit container width (mobile/accessibility)
web when you want text to reflow to fit the container. This is recommended for mobile devices and WCAG AA reflow compliance (Success Criterion 1.4.10).
mode is set to download, the submit button is hidden.
Field system
Fields use a uniqueid system for identifying and updating content:
id- Unique identifier for the field
Document fields (injected values)
Document fields populate placeholders in your document. Three types are supported:Text fields
Simple text replacement (type is optional, defaults to'text'):
Table fields
Populate table rows with a 2D array. The first row in the document serves as a template and is preserved, while new rows are appended with the same styling:Signature fields from the signer are automatically converted to images when injected into the document. Use the
textToImageDataUrl utility if you need to generate signature images programmatically.Signer fields (interactive)
signature- Default text input (use a custom component for other UI)checkbox- Checkbox fieldtext- Text input field
Custom components
Three levels of customization:Level 1: Use defaults
Level 2: Customize labels
Level 3: Custom components
Event handlers
Zoom
Control document zoom programmatically via the component ref:Example: zoom controls
Zoom works with both
print and web layout modes. In print mode, zoom is applied through the layout engine (ProseMirror). In web mode, zoom is applied via CSS transforms.PDF support
Render PDF documents in eSign by passing thepdf prop. This forwards the PDF module config to SuperDoc internally. The component handles format detection automatically: when pdf is provided with a URL source, it tells SuperDoc to use the PDF renderer.
pdf prop
How it works
- SuperDoc fires
onPdfDocumentReadyinstead ofonReadyfor PDFs. The eSign component handles both callbacks, so it works regardless of document type. - PDFs don’t have a ProseMirror editor, so
fields.documenthas no effect. Usefields.signerfor interactive fields like checkboxes and signatures. - Use
viewOptions: { layout: 'print' }for fixed page widths that match the original PDF layout.
Memoize the
pdf config object to avoid unnecessary re-initialization. Use useMemo in React or a stable reference from the caller.Styling
The component can be styled using standard CSS. Optionally import default styles:CSS classes
Target these classes to customize appearance:Customizing with CSS
Style the component using standard CSS - no special variables needed:Themed example
Style the component to match your brand.Structure
CSS
Component
Telemetry
Telemetry is enabled by default withsource: 'esign' metadata. You can override or extend the defaults:
License key
PasslicenseKey to identify your organization in telemetry:

