# Next.js (App Router)

```tsx

import Script from 'next/script'
import { type Metadata } from 'next'

import dynamic from 'next/dynamic'

export const metadata: Metadata = {
  title: {
    template: '%s - Waitlisty',
    default: 'Waitlisty - Build excitement for your product',
  },
  description: 'Build excitement for your product',
}

// A css loader string will be injected with a <Script> component
const cssLoader = `
    let head = document.getElementsByTagName('HEAD')[0];
    let link = document.createElement('link');
    link.rel = 'stylesheet';
    link.type = 'text/css';
    link.href = 'https://jzcjrtlxrpzxgszlwttl.supabase.co/storage/v1/object/public/formbuilder_v2/formBuilder_v2.css?t=2024-07-22T17%3A06%3A40.577Z';
    head.appendChild(link);
`

export default function RootLayout({
  children,
}: {
  children: React.ReactNode
}) {
  return (
    <html lang="en">
      {/* Here's the script component */}
      <Script
        id="waitlist-css"
        type=""
        dangerouslySetInnerHTML={{ __html: cssLoader }}
      ></Script>
      <body suppressHydrationWarning={true}>
        {children}
      </body>
      {/* Our Waitlisty widget script */}
      <Script src="https://jzcjrtlxrpzxgszlwttl.supabase.co/storage/v1/object/public/scripts/waitlisty-widget.js" defer></Script>
    </html>
  )
}
```


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.waitlisty.io/embeddable-form/embed-your-form/next.js-app-router.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
