Skip to main content
All eSign options and customization

Document options

Control how the document is displayed and what’s required:

View options

Control how the document is displayed using viewOptions.layout:
  • print (default) - Fixed page width, displays document as it prints
  • web - Content reflows to fit container width (mobile/accessibility)
Use 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).
Deprecated options: layoutMode and layoutMargins are deprecated since v2.0. Use viewOptions instead:
  • layoutMode: 'responsive'viewOptions: { layout: 'web' }
  • layoutMode: 'paginated'viewOptions: { layout: 'print' }
  • layoutMargins is no longer supported. Use CSS to control margins.
When mode is set to download, the submit button is hidden.

Field system

Fields use a unique id 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:
These update fields with matching IDs in your document.
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)

Field types:
  • signature - Default text input (use a custom component for other UI)
  • checkbox - Checkbox field
  • text - 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 the pdf 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 onPdfDocumentReady instead of onReady for PDFs. The eSign component handles both callbacks, so it works regardless of document type.
  • PDFs don’t have a ProseMirror editor, so fields.document has no effect. Use fields.signer for 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 with source: 'esign' metadata. You can override or extend the defaults:
To disable telemetry:
For more details on how telemetry works, see the Telemetry page.

License key

Pass licenseKey to identify your organization in telemetry:
The key is used solely for organization identification. It does not enable or disable any features, and nothing is blocked if a usage quota is reached. The key is forwarded to the underlying SuperDoc instance.

Complete example