![require(esm) Backported to Node.js 20, Paving the Way for ESM-Only Packages](https://cdn.sanity.io/images/cgdhsj6q/production/be8ab80c8efa5907bc341c6fefe9aa20d239d890-1600x1097.png?w=400&fit=max&auto=format)
Security News
require(esm) Backported to Node.js 20, Paving the Way for ESM-Only Packages
require(esm) backported to Node.js 20, easing the transition to ESM-only packages and reducing complexity for developers as Node 18 nears end-of-life.
@anvilco/anvil-embed-frame
Advanced tools
The AnvilEmbedFrame React component for embedded Etch signatures and Workflows.
AnvilEmbedFrame
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.
Learn more on our Anvil developer page.
yarn add @anvilco/anvil-embed-frame
npm install @anvilco/anvil-embed-frame
import AnvilEmbedFrame from '@anvilco/anvil-embed-frame'
<AnvilEmbedFrame
iframeURL={etchSignURL || workflowURL || editorURL}
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
// Etch e-signatures
<AnvilEmbedFrame
iframeURL="https://app.useanvil.com/api/etch/verify/QL3RjmpXWBD4W6YCHSLr?token=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzaWduZXJJZCI6MTg3LCJjbGllbnRVc2VySWQiOiJzaWduZXIxIiwiY3JlYXRlZEF0IjoxNjY0NTY4NTkyNTk0LCJleHRyYSI6IkNVQlIiLCJpYXQiOjE2NjQ1Njg1OTIsImV4cCI6MTY2NDY1NDk5Mn0.RMpoBXdAU5k6ozX3y2xoI8ykqx2BXycIKNX7Kq0EFFs"
/>
// For Workflows
<AnvilEmbedFrame
iframeURL="https://app.useanvil.com/weld/my-org/my-workflow"
/>
Function - This function is called when an event is triggered.
Possible event types for Etch e-sign include: signerComplete
, signerError
.
Possible event types for Workflows include: forgeSubmitPage
, 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 scrollingPlease file an issue for bugs, missing documentation, or unexpected behavior.
Please email us at support@useanvil.com.
MIT
FAQs
The AnvilEmbedFrame React component for embedded Etch signatures and Workflows.
The npm package @anvilco/anvil-embed-frame receives a total of 4,861 weekly downloads. As such, @anvilco/anvil-embed-frame popularity was classified as popular.
We found that @anvilco/anvil-embed-frame demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 6 open source maintainers collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
require(esm) backported to Node.js 20, easing the transition to ESM-only packages and reducing complexity for developers as Node 18 nears end-of-life.
Security News
PyPI now supports iOS and Android wheels, making it easier for Python developers to distribute mobile packages.
Security News
Create React App is officially deprecated due to React 19 issues and lack of maintenance—developers should switch to Vite or other modern alternatives.