Let’s add the SurfaceFormScript() component that we created in Step 2 to the pages/_app.tsx file:
import "@/styles/globals.css";
import type { AppProps } from "next/app";
import SurfaceFormScript from "../../surfaceFormScript";

export default function App({ Component, pageProps }: AppProps) {
  return (
    <>
      <Component {...pageProps} />
      <SurfaceFormScript
         formUrl="REPLACE ME WITH FORM URL" // Replace this with a Surface Form URL
         embedType="popup"
         popupSize="medium" // "small", "medium", "large"
         buttonClassName="surface-form-button"
       />
    </>
  );
}
Add the surface-form-button className to the element you want to use to trigger the form.
export default function Home() {
    return (
        <div>
            <button className="surface-form-button">Open Form</button>
        </div>
    );
}