Skip to main content

Popup Builder

This guide walks you through embedding Unlayer's drag-and-drop popup builder into your web application. The popup builder lets your users design popups, modals, and overlays for lead capture, promotions, and announcements.


Step 1: Install the SDK

Add the script tag to your HTML:

<script src="https://editor.unlayer.com/embed.js"></script>

Step 2: Initialize the Editor

Set displayMode to popup to load the popup builder.

Recommended Size

For the best experience, ensure the editor container is at least 1024px wide and 700px high. The editor will expand to fill the entire container.

<div id="editor-container" style="height: 700px;"></div>

<script>
unlayer.init({
id: 'editor-container',
displayMode: 'popup',
projectId: 1234, // Replace with your project ID
});
</script>

Where to get the Project ID?

  1. Log in to the Developer Console
  2. Create a Project
  3. You can find the project ID in Project > Builder > Settings

What's Next