# Popup



### Create Surface Constructor [#create-surface-constructor]

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

```html
 <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-classname-to-the-target-element]

Add &#x2A;*`surface-form-button`** class to the HTML element if you want to show the form as a popup.

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