Research
Security News
Malicious npm Package Targets Solana Developers and Hijacks Funds
A malicious npm package targets Solana developers, rerouting funds in 2% of transactions to a hardcoded address.
@anvilco/react-signature-modal
Advanced tools
The AnvilSignatureModal React component for embedded Etch signatures
A lightweight modal component that handles the Anvil Etch signing lifecycle. Compatible with mobile viewports with minimal dependencies.
yarn add @anvilco/react-signature-modal
npm install @anvilco/react-signature-modal
import AnvilSignatureFrame from '@anvilco/react-signature-modal'
<AnvilSignatureModal
signURL={signURL}
isOpen={isModalOpen}
onClose={() => setIsModalOpen(false)}
onLoad={() => setLoading(false)}
onFinish={(redirectURL) => window.location.assign(redirectURL)}
/>
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:
signURL={`https://app.useanvil.com/etch/8iJDbq8dkEmjrsNw7Dnb/sign?token=dsa...`}
The modal is displayed if isOpen
is true.
This function is called when the X button is clicked on the top right corner.
Example:
onClose={() => setIsOpen(false))}
This function is called when the signing page has finished loading.
Example:
onLoad={() => setLoading(false)}
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.
onFinish={(redirectURL) => window.location.assign(redirectURL)}
Pass in a query selector identifying the root of your app. Used to hide other page content while the modal is open for screenreaders and other accessibility purposes.
Default: #root
Show the close icon on the top right of the modal if true.
Set to false to disable the default inline styles of the component.
Pass in custom props into the paragraph tag displayed if the user's browser does not support iframes.
Example:
iframeWarningProps={{ className: 'warning-text' }}
Pass in custom props into the iframe tag displayed within the modal.
Example:
AnvilFrameProps={{
id: 'my-modal',
style: { background: 'white' },
}}
Pass in custom props into the svg tag for the delete button displayed within the modal.
Example:
AnvilFrameProps={{ className: 'custom-delete-class' }}
Customize the component by overriding the default styles. Pass in props to override IDs and classNames.
Please file an issue for bugs, missing documentation, or unexpected behavior.
Please email us at hello@useanvil.com.
FAQs
The AnvilSignatureModal React component for embedded Etch signatures
The npm package @anvilco/react-signature-modal receives a total of 342 weekly downloads. As such, @anvilco/react-signature-modal popularity was classified as not popular.
We found that @anvilco/react-signature-modal 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.
Research
Security News
A malicious npm package targets Solana developers, rerouting funds in 2% of transactions to a hardcoded address.
Security News
Research
Socket researchers have discovered malicious npm packages targeting crypto developers, stealing credentials and wallet data using spyware delivered through typosquats of popular cryptographic libraries.
Security News
Socket's package search now displays weekly downloads for npm packages, helping developers quickly assess popularity and make more informed decisions.