
Security News
Security Community Slams MIT-linked Report Claiming AI Powers 80% of Ransomware
Experts push back on new claims about AI-driven ransomware, warning that hype and sponsored research are distorting how the threat is understood.
@eventespresso/react-exit-modal-typeform
Advanced tools
React component that allows the triggering of an typeform form via modal
This is a react component that provides an embedded typeform for use a exit modal survey. Use-cases are:
The modal that opens has an initial "options" view where the user is presented with two buttons. One to fill out a survey, and another to skip the survey. Skipping the survey will continue on with the original action triggered. If they choose to fill out a survey, then the next view in the modal will present them with an embedded typeform to fill out.
Install the module
npm install @eventespresso/react-exit-modal-typeform
A very basic usage example (triggering outside react):
import React from 'react';
import ReactDOM from 'react-dom';
import $ from 'jquery';
import ReactModal from 'react-modal';
import ExitModal, { CLOSE_MODAL_EVENT } from '@eventespresso/react-exit-modal-typeform';
const modalProps = {
    typeFormUrl: 'https://yourtypeformdomain.typeform.com/to/XXXXX'
}
/**
* Element that the modal is anchored to
*/
const modalAnchor = document.getElementById('react-cancel-modal');
let modalComponent = {};
const closeModalCallback = (e) => {
    //do stuff that happens after the modal closes, eg continue with a subscription cancel action etc.
    processSubscriptionCancel();
    //make sure you remove the event listener.
    modalComponent.el.removeEventListener(CLOSE_MODAL_EVENT, closeModalCallback);
};
$('.some-dom-element-trigger-container').on('click', '.element-clicked', function(e) {
   e.preventDefault();
   ReactModal.setAppElement(modalAnchor);
   modalComponent = ReactDOM.render(
       <ExitModal {...modalProps} />,
       modalAnchor
   );
   
   //set listener
   modalComponent.el.addEventListener(
       CLOSE_MODAL_EVENT,
       closeModalCallback,
       false
    );
});
There are a number of properties you can use to control the ExitModal.  The only required property is the typeFormUrl property.
| Property | Type | Description | 
|---|---|---|
| showModal | bool | Whether to initialize with the modal open or not. | 
| showTypeForm | bool | Whether to display the typeForm right away or not. | 
| styles | object | You set inline styles for the modal via this property. | 
| styles.overlay | object | Inline styles for the overlay when the modal is open.  Use javascript DOM style notation for the keys. Note: It's recommended you use modalClassNameand style via css class instead.  However inline styles are provided for cases where style attributes may be dynamically calculated. | 
| styles.content | object | Inline styles for the modal content container. | 
| styles.typeFormStyle | object | Inline styles for the container holding the embedded typeform (defaults to 600x400). | 
| buttonClass | object | Provde css class for button styles. | 
| buttonClass.doSurvey | string | CSS classname for the button triggering doing the survey. | 
| buttonClass.closeModal | string | CSS classname for the button triggering closing the modal. | 
| modalClassName | object | Provide css class to use with styling. | 
| modalClassName.content | string | CSS classname to use for the modal content container. | 
| modalClassName.overlay | string | CSS classname to use for the modal overlay. | 
| typeFormUrl | string | required The url to your TypeForm that will be embedded in the modal content. | 
| introText | string | Text displayed in the initial view. Defaults to We're sorry to see you go! Will you share feedback through a short survey to help us improve our product? | 
| skipButtonText | string | Skip button text. Defaults to Skip | 
| doSurveyButtonText | string | Start survey button text. Defaults to Sure I'll help! | 
FAQs
React component that allows the triggering of an typeform form via modal
We found that @eventespresso/react-exit-modal-typeform demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer 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
Experts push back on new claims about AI-driven ransomware, warning that hype and sponsored research are distorting how the threat is understood.

Security News
Ruby's creator Matz assumes control of RubyGems and Bundler repositories while former maintainers agree to step back and transfer all rights to end the dispute.

Research
/Security News
Socket researchers found 10 typosquatted npm packages that auto-run on install, show fake CAPTCHAs, fingerprint by IP, and deploy a credential stealer.