Skip to main content
Complete eSign component API

Component props

Required props

string
required
Unique identifier for this signing session
object
required
Document configuration
function
required
Called when document is signed

Optional props

object
Field configuration
object
Download button configuration
object
Submit button configuration
function
Handle download action
function
Monitor state changes
function
Track field changes
function
Called when document fields are found
object
Telemetry configuration. Enabled by default with source: 'esign' metadata. See Telemetry for details.
string
License key for SuperDoc. Passed directly to the underlying SuperDoc instance.
boolean
Disable all interactions
string
CSS class for container
React.CSSProperties
Inline styles for container
string
Height of document viewer (default: '600px')

Types

SubmitData

Data passed to onSubmit:

DownloadData

Data passed to onDownload:

DocumentField

Values injected into document:
For table fields, the value is a 2D array where each inner array represents a row.

SignerField

Interactive field definition:

SigningState

Current state passed to onStateChange:

AuditEvent

Timestamped interaction log:

ViewOptions

Document view options (recommended):

LayoutMargins (Deprecated)

Deprecated since v2.0. Use CSS for margin control.

SuperDocESignHandle

Ref type for accessing component methods:

Ref methods

Access via ref:

Available methods

  • getState() - Returns current SigningState
  • getAuditTrail() - Returns audit events array
  • reset() - Clear all state and start over
  • updateFieldInDocument() - Update a document field by id

Field components

Default components

The component provides default implementations for all field types. You can import and extend them:

Custom component props

All custom field components receive:

CSS classes

Target these classes for styling:
  • .superdoc-esign-container - Main wrapper
  • .superdoc-esign-document - Document viewer area
  • .superdoc-esign-controls - Controls section
  • .superdoc-esign-fields - Field container
  • .superdoc-esign-actions - Button container
  • .superdoc-esign-btn - Default buttons

Import types

All types are exported:

Utils

textToImageDataUrl

Converts text to a base64 image data URL. This is useful if you want to generate the same base64 image that is created for typed signatures on the document.