React.js

Popup

Embed a Surface Form popup

Create Surface Constructor

Go to the public/index.html file in your React.js project and add the following code at the end of <body> tag:

 <script>
  (function () {
     const surface_src = "your_form_url";
     const surface_embed_type = "popup";
     const target_element_class = "surface-form-button";
     const c = new SurfaceEmbed(
       surface_src,
       surface_embed_type,
       target_element_class
     );
     c.popupSize = "medium"; // "small", "medium", "large"
   })();
 </script>

Add className to the Target Element

Add surface-form-button class to the HTML element if you want to show the form as a popup.

<button className="surface-form-button">Open Form</button>

Ready to Get Started?

See it on your own site, or open the app and build the first form.

Need Help?

Setup problems, blocked domains and CRM push failures live in the Help Center.

Feature Requests?

Tell us what is missing. We would rather hear it than guess.

On this page