The AnvilEmbedFrame React component for embedded Etch signatures and Workflows.
npm install @anvilco/anvil-embed-frameAnvilEmbedFrame is a very minimal React component that allows you to embed Anvil Etch e-signatures, Workflows, and embedded builders into your app with an iframe. It will give you information via callback onEvent.
See the Etch e-sign live demo and open-source demo repository for an embedded Etch e-sign usage example using this component.
Anvil provides easy APIs for all things paperwork.
1. PDF filling API - fill out a PDF template with a web request and structured JSON data.
2. PDF generation API - send markdown or HTML and Anvil will render it to a PDF.
3. Etch E-sign with API - customizable, embeddable, e-signature platform with an API to control the signing process end-to-end.
4. Anvil Workflows (w/ API) - Webforms + PDF + E-sign with a powerful no-code builder. Easily collect structured data, generate PDFs, and request signatures.
Learn more on our Anvil developer page.
``sh`
yarn add @anvilco/anvil-embed-frame
`sh`
npm install @anvilco/anvil-embed-frame
`js
import AnvilEmbedFrame from '@anvilco/anvil-embed-frame'
onEvent={(eventObject) => console.log('Event object:', eventObject)}
className="anvil-embed-frame"
style={{ border: 'none' }}
/>
`
Beginning in v2.0, the enableDefaultStyles prop has been removed. There are now _no_ default styles embedded in the AnvilEmbedFrame, the frame will use default browser iframe styling. You can style the iframe with CSS and add className and style props to the component
String (required) - A URL to the Anvil page you'd like to embed.
For Etch e-sign, refer to these docs for instructions on generating the signing URL.
For Workflows, refer to these docs for instructions on retrieving the Workflow URL.
Example
`js
// Etch e-signatures
/>
// For Workflows
/>
`
Function - This function is called when an event is triggered.
Possible event types for Etch e-sign include: signerComplete, signerError.forgeSubmitPage
Possible event types for Workflows include: , forgeComplete, weldComplete.
Defaults to (eventObject) => {}
String - Set scroll to the iframe
* auto - scrolls the window to the iframe when mountedsmooth
* smoothly scrolls the window to the iframe when mountednull` - disables scrolling
*
* Get started with Anvil API
* Etch E-sign API
* Workflows API
* To enable iframe embedding, go to your organization's settings in Anvil, and enable "Iframe Embedding" in the API section.
* Please contact us at support@useanvil.com to enable iframe embedding for our embedded builders UIs: the PDF template builder, e-sign packet builder, or Workflow builder.
* React >= v16.0 required.
Please file an issue for bugs, missing documentation, or unexpected behavior.
Please email us at support@useanvil.com.
MIT