Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@anvilco/react-signature-modal

Package Overview
Dependencies
Maintainers
6
Versions
20
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@anvilco/react-signature-modal - npm Package Compare versions

Comparing version 1.4.0 to 1.4.1

dist/index.js

12

package.json
{
"name": "@anvilco/react-signature-modal",
"version": "1.4.0",
"version": "1.4.1",
"description": "The AnvilSignatureModal React component for embedded Etch signatures",
"author": "Anvil Foundry Inc.",
"license": "MIT",
"main": "lib/index.js",
"main": "dist/index.js",
"scripts": {

@@ -35,3 +35,4 @@ "build": "webpack --mode production",

"react": "^16.8.0",
"react-dom": "^16.8.0"
"react-dom": "^16.8.0",
"react-modal": "^3.11.2"
},

@@ -41,5 +42,6 @@ "peerDependencies": {

"react": "^16.8.0",
"react-dom": "^16.8.0"
"react-dom": "^16.8.0",
"react-modal": "^3.11.2"
},
"gitHead": "7ec62ef64e620054e72743cfc98e808d9ae7993c"
"gitHead": "bda11ca1d4be0591594f08dd3ef157a8c2ff35d1"
}
# AnvilSignatureModal
A lightweight modal component that handles the [Anvil Etch](https://www.useanvil.com/etch-free-e-signatures) signing lifecycle. Compatible with mobile viewports with minimal dependencies.
A modal component that handles the signing process lifecycle. Compatible with mobile viewports with minimal dependencies.
## Usage
```
yarn add @anvilco/react-signature-modal
```
```
npm install @anvilco/react-signature-modal
```
## Usage:
```js
import AnvilSignatureModal from '@anvilco/react-signature-modal'
import AnvilSignatureFrame from '@anvilco/react-signature-modal'
import '@anvilco/react-signature-modal/dist/styles.css'

@@ -19,1 +26,74 @@ <AnvilSignatureModal

```
### Props
#### signURL
##### string (required)
A URL to the Anvil signature page generated from the `generateEtchSignURL` GraphQL mutation. The signature frame will be displaying the signing page through this URL.
Example:
```js
signURL={`https://app.useanvil.com/etch/8iJDbq8dkEmjrsNw7Dnb/sign?token=dsa...`}
```
#### isOpen
##### boolean
The modal is displayed if `isOpen` is true.
#### onClose
##### function
This function is called when the X button is clicked on the top right corner.
Example:
```js
onClose={() => setIsOpen(false))}
```
#### onLoad
##### function
This function is called when the signing page has finished loading.
Example:
```js
onLoad={() => setLoading(false)}
```
#### onFinish
##### function
This function takes the `redirectURL` as a parameter; called when a user has finished signing.
Example:
This is called by default if not defined otherwise.
```js
onFinish={(redirectURL) => window.location.assign(redirectURL)}
```
#### width | height
##### number | string
The width/height of the iframe in CSS pixels. Default is 900w by 1100h.
## Styling
Styles are not embedded into the React component to support customization. The default styles are provided within the modules under `dist/styles.css`.
## Anvil Etch E-Sign Docs
[Read the Docs](https://www.useanvil.com/docs/api/e-signatures)
## Notes
* The `allowFormEmbed` config must be set to `true` under your [Anvil organization](https://useanvil.com) for embedded signing. Please reach us at [support@useanvil.com](mailto:hello@useanvil.com).
* React ^v16.8.0 is required.
## Bugs
Please file an issue for bugs, missing documentation, or unexpected behavior.
## Questions or Feedback
Please email us at [hello@useanvil.com](mailto:hello@useanvil.com).
SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc