> ## Documentation Index
> Fetch the complete documentation index at: https://formhug.ai/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# Embed in Your Website

> Add your FormHug form to any webpage as an inline block, popup, full-screen overlay, or side slider

Embed your form directly into any webpage — choose from four display types depending on where and how you want the form to appear.

<img src="https://mintcdn.com/formhug-8bc4ebd1/riGHaqbMmfoJyzD5/images/embed/embed.png?fit=max&auto=format&n=riGHaqbMmfoJyzD5&q=85&s=9489006be67f347f2c65cbfa374e106f" alt="FormHug embed types: Standard, Popup, Full screen, Slider" width="3688" height="1316" data-path="images/embed/embed.png" />

## Getting the Embed Code

<Steps>
  <Step title="Publish your form">
    Click **Publish** in the top-right corner of the form editor.
  </Step>

  <Step title="Open the embed dialog">
    Click **Share**, then select **Add to website**.
  </Step>

  <Step title="Choose an embed type">
    Select **Standard**, **Popup**, **Full screen**, or **Slider** from the **Embed type** dropdown.
  </Step>

  <Step title="Configure options">
    Set button text, color, size, and position as needed — the preview panel updates in real time. Toggle between **Desktop** and **Mobile** to check both layouts.
  </Step>

  <Step title="Get the code">
    Click **Get the code** and paste the generated `<script>` tag into your webpage.
  </Step>
</Steps>

## Standard

Embeds the form inline at the exact position where you place the code. The form is always visible as part of the page — no trigger needed.

<img src="https://mintcdn.com/formhug-8bc4ebd1/riGHaqbMmfoJyzD5/images/embed/standard.png?fit=max&auto=format&n=riGHaqbMmfoJyzD5&q=85&s=37f698e746ffb23edb44bd915b80bf07" alt="Standard embed type showing form inline within the page" width="2216" height="1938" data-path="images/embed/standard.png" />

Use Standard for dedicated landing pages, sign-up sections, or any location where the form should be the main focus.

```html theme={null}
<script src="https://formhug.ai/f/YOUR_FORM_ID/embedded.js?inner_redirect=false&banner=show&height=600"></script>
```

The `height` query parameter controls how tall the embedded form appears on the page. Adjust it to match your form's length — short forms typically need 400–500px; longer forms need 700px or more.

## Popup

Opens the form in a centered overlay when triggered. By default a floating button appears on the page; turn it off to use your own element as the trigger.

<img src="https://mintcdn.com/formhug-8bc4ebd1/riGHaqbMmfoJyzD5/images/embed/popup.png?fit=max&auto=format&n=riGHaqbMmfoJyzD5&q=85&s=2f1539abba7fae41ced1b1112c414827" alt="Popup embed showing floating trigger button and overlay form" width="2224" height="1940" data-path="images/embed/popup.png" />

```html theme={null}
<script async src="https://formhug.ai/f/YOUR_FORM_ID/embedded.js"
  data-formhug-id="YOUR_FORM_ID"
  data-formhug-type="popup"
  data-formhug-button-text="Open Form"
  data-formhug-button-color="#1677ff"
  data-formhug-button-size="small"
  data-formhug-floating="true"
  data-formhug-floating-position="bottomRight"></script>
```

| Attribute                        | Description                                                    |
| -------------------------------- | -------------------------------------------------------------- |
| `data-formhug-button-text`       | Label shown on the trigger button                              |
| `data-formhug-button-color`      | Background color of the button (hex)                           |
| `data-formhug-button-size`       | `small`, `medium`, or `large`                                  |
| `data-formhug-floating`          | `true` to show a fixed button; `false` to use a custom trigger |
| `data-formhug-floating-position` | Position of the fixed button: `bottomRight` or `bottomLeft`    |

<Note>
  When `data-formhug-floating="false"`, add `data-formhug-open` to any element on your page to use it as the trigger — for example: `<button data-formhug-open>Contact us</button>`.
</Note>

## Full Screen

Opens the form as a full-viewport overlay, covering the entire page. Configuration attributes are the same as Popup.

<img src="https://mintcdn.com/formhug-8bc4ebd1/riGHaqbMmfoJyzD5/images/embed/full-screen.png?fit=max&auto=format&n=riGHaqbMmfoJyzD5&q=85&s=4d9d7416a4a148f798aa8c795eea6851" alt="Full screen embed showing form covering the entire viewport" width="2246" height="1800" data-path="images/embed/full-screen.png" />

```html theme={null}
<script async src="https://formhug.ai/f/YOUR_FORM_ID/embedded.js"
  data-formhug-id="YOUR_FORM_ID"
  data-formhug-type="fullscreen"
  data-formhug-button-text="Open Form"
  data-formhug-button-color="#1677ff"
  data-formhug-button-size="small"
  data-formhug-floating="true"
  data-formhug-floating-position="bottomRight"></script>
```

## Slider

Slides the form in from the left or right edge of the page. Useful for keeping the page content visible while the form is open.

<img src="https://mintcdn.com/formhug-8bc4ebd1/riGHaqbMmfoJyzD5/images/embed/slider.png?fit=max&auto=format&n=riGHaqbMmfoJyzD5&q=85&s=6ae97eedd27874d9d60f90f8100f9940" alt="Slider embed showing form sliding in from the right side of the page" width="2220" height="1948" data-path="images/embed/slider.png" />

```html theme={null}
<script async src="https://formhug.ai/f/YOUR_FORM_ID/embedded.js"
  data-formhug-id="YOUR_FORM_ID"
  data-formhug-type="slider"
  data-formhug-button-text="Open Form"
  data-formhug-button-color="#1677ff"
  data-formhug-button-size="small"
  data-formhug-floating="true"
  data-formhug-floating-position="bottomRight"
  data-formhug-slider-side="right"></script>
```

Slider supports all the same attributes as Popup, plus one additional attribute:

| Attribute                  | Description                                            |
| -------------------------- | ------------------------------------------------------ |
| `data-formhug-slider-side` | Which side the form slides in from — `left` or `right` |

## Platform Guides

<CardGroup cols={2}>
  <Card title="WordPress" icon="wordpress" href="/guides/embed/wordpress">
    Embed in WordPress
  </Card>

  <Card title="Webflow" icon="globe" href="/guides/embed/webflow">
    Embed in Webflow
  </Card>

  <Card title="Notion" icon="book" href="/guides/embed/notion">
    Embed in Notion
  </Card>

  <Card title="Framer" icon="frame" href="/guides/embed/framer">
    Embed in Framer
  </Card>
</CardGroup>

## Related

<CardGroup cols={2}>
  <Card title="Share Link" icon="link" href="/features/sharing/share-link">
    All sharing options including QR code, social, and AI poster
  </Card>

  <Card title="Lead Generation Guide" icon="book-open" href="https://formhug.ai/blog/how-to-build-a-lead-generation-form" target="_blank">
    Learn how to structure and place forms that capture qualified leads
  </Card>
</CardGroup>
