Docs
Creating Beautiful Modals & Popups

Creating Beautiful Modals & Popups

Learn how to design stunning modal windows and popups for newsletters, promotions, and announcements using ai4shops.com

Modal windows (popups) are powerful tools for capturing attention and converting visitors. With ai4shops.com's Modal Designer, you can create beautiful, professional modals without any coding knowledge.

Prerequisites: Make sure you have created a project before starting this guide.

Video Placeholder: Modal Editor Tour

Duration: 3-4 minutes | Complete walkthrough of the modal editor interface


What Are Modals?

Modals are overlay windows that appear on top of your website content. Common uses include:

  • Newsletter Signups - Grow your email list
  • Promotional Offers - Announce sales and discounts
  • Exit Intent Popups - Capture leaving visitors
  • Announcements - Share important updates
  • Feedback Collection - Gather customer opinions
  • Contact Forms - Provide easy contact options

Creating a New Modal

Step 1: Navigate to Modals

From your project dashboard, click "Modals" in the sidebar.

Screenshot: Modal list page with creation options

File: /_static/guides/modal-designer/modal-list-en.png

Step 2: Choose Creation Method

You have two options:

OptionDescription
Create NewStart with a blank canvas
From TemplateStart with a pre-designed template

Step 3: Name Your Modal

Enter a descriptive name like "Newsletter Popup" or "Summer Sale Banner".


Start faster with our professionally designed templates!

Newsletter Templates

Newsletter Signup

Clean, minimal email capture

View
#### VIP Newsletter Premium styling for exclusive offers
View

Never Miss Out

FOMO-driven signup with social proof

View

Discount Templates

Discount Popup

With countdown timer for urgency

View

Winter Sale

Seasonal promotion with festive design

View

Other Templates

  • Contact Form - Simple contact information capture
  • Announcement Banner - Important notifications
  • Feedback Survey - Quick customer feedback collection

Screenshot: Template library grid

File: /_static/guides/modal-designer/template-library-en.png


The Modal Editor is your creative workspace. Let's explore its components:

Screenshot: Full editor interface with callouts

File: /_static/guides/modal-designer/editor-interface-en.png

Canvas

The central area where you design your modal:

  • Pixel-perfect positioning - Drag elements anywhere
  • Snap-to-grid - Align elements precisely
  • Resize handles - Adjust element dimensions
  • Multi-select - Select multiple elements (Shift+Click)

Element Toolbar

Add elements to your modal:

ElementUse For
TextHeadlines, descriptions, labels
ImageLogos, product photos, illustrations
ButtonCall-to-action, submit, close
InputText fields, email fields
CheckboxConsent, preferences
ContainerGroup elements together

Layers Panel

Manage element stacking order:

  • Drag layers to reorder (front/back)
  • Lock layers to prevent accidental changes
  • Hide layers for easier editing
  • Rename layers for organization

Properties Panel

Configure the selected element:

  • Position & Size - X, Y, Width, Height
  • Style - Colors, borders, shadows
  • Typography - Font, size, weight
  • Actions - Click behaviors

Styling Your Modal

Create visually stunning modals with our styling options.

Canvas Settings

Step 1: Select the Canvas

Click on the canvas background (not any element) or select "Canvas" from the layers panel.

Step 2: Configure Size

Set your modal dimensions:

PresetDimensionsBest For
Small400 x 300pxSimple messages
Medium500 x 400pxNewsletter signups
Large600 x 500pxDetailed forms
CustomAny sizeSpecific needs

Step 3: Set Background

Choose your background:

  • Solid Color - Clean, professional look
  • Gradient - Modern, dynamic feel
  • Image - Brand imagery or patterns

Screenshot: Canvas properties panel

File: /_static/guides/modal-designer/canvas-properties-en.png

Element Styling

Step 1: Select an Element

Click on any element in the canvas or layers panel.

Step 2: Configure Colors

In the Properties panel:

  • Fill Color - Element background
  • Text Color - Text content color
  • Border Color - Element outline

Step 3: Add Effects

Enhance with visual effects:

  • Border Radius - Rounded corners
  • Shadow - Depth and elevation
  • Opacity - Transparency level

Screenshot: Properties panel styling options

File: /_static/guides/modal-designer/element-styling-en.png

Glass-Morphism Effect

For a modern, translucent appearance:

  1. Select element or canvas
  2. Enable "Glass Effect" toggle
  3. Adjust blur intensity (5-20px recommended)
  4. Set background opacity (60-80% recommended)

Adding Form Elements

Collect information from visitors with form inputs.

Screenshot: Form elements in modal

File: /_static/guides/modal-designer/form-elements-en.png

Available Input Types

Input TypeDescriptionUse Case
Text InputSingle-line textName, subject
Email InputEmail validationNewsletter signup
TextareaMulti-line textMessages, feedback
CheckboxYes/No selectionConsent, preferences
Radio ButtonsSingle choiceOptions, plans
Select DropdownMultiple choicesCategories, countries

Configuring Inputs

Step 1: Add Input Element

Drag an input from the toolbar onto the canvas.

Step 2: Set Input Properties

Configure in the Properties panel:

  • Label - Displayed text
  • Placeholder - Example text inside field
  • Required - Make field mandatory
  • Validation - Email format, min/max length

Step 3: Set Field Name

The Name property identifies the field when data is submitted:

email, firstName, phone, message

Actions & Events

Make your modal interactive with actions!

Screenshot: Action configuration panel

File: /_static/guides/modal-designer/actions-config-en.png

Available Actions

ActionDescription
closeModalClose the modal window
submitFormSubmit form data to connected form
navigateToOpen a URL or page
customJSExecute custom JavaScript (sandboxed)

Configuring Button Actions

Step 1: Select a Button

Click on a button element in your modal.

Step 2: Open Actions Panel

In the Properties panel, find the "Actions" or "On Click" section.

Step 3: Add Action

Click "Add Action" and select the action type:

Example: Submit and Close

  1. Add submitForm action
  2. Add closeModal action

Actions execute in order from top to bottom.

Step 4: Configure Action Parameters

For navigateTo:

URL: https://yoursite.com/thank-you
Open in: New Tab / Same Tab

For customJS:

console.log("Form submitted!");
// Your custom code here

Note: Custom JavaScript is sandboxed for security. Access to cookies, localStorage, and certain DOM operations may be restricted.


Connecting Modal to Form

To save form submissions, connect your modal to a Form in ai4shops.com.

Screenshot: Connect modal dialog

File: /_static/guides/modal-designer/connect-form-en.png

Why Connect to a Form?

When connected:

  • Submissions are saved to your database
  • You can view all responses in your dashboard
  • Export data to CSV/Excel
  • Set up email notifications
  • Track conversion analytics

How to Connect

Step 1: Open Modal Settings

Click the settings icon or go to Modal Settings.

Step 2: Select "Connect to Form"

Click "Connect to Form" or "Data Connection".

Step 3: Choose a Form

Either:

  • Select an existing form from the dropdown
  • Create a new form with "Create New Form"

Step 4: Map Fields

Ensure modal input names match form field names:

Modal Input NameForm Field
emailEmail field
firstNameFirst Name field
messageMessage field

Step 5: Save Connection

Click "Connect" to link the modal and form.

Now when visitors submit your modal, data flows to your connected form!


Embedding Your Modal

Add your modal to any website with a simple embed code.

Video Placeholder: Creating Newsletter Popup from Scratch

Duration: 5 minutes | Building and embedding a complete newsletter modal

Step 1: Generate Embed Code

In your modal, click "Embed" or "Get Code".

Screenshot: Embed dialog with options

File: /_static/guides/modal-designer/embed-dialog-en.png

Step 2: Choose Display Mode

ModeDescriptionUse Case
PopupFloating overlayPromotions, signups
InlineEmbedded in page contentContact sections

Step 3: Configure Trigger

For Popup mode, choose when to display:

TriggerDescription
On LoadShow immediately when page loads
DelayShow after X seconds
Scroll %Show when user scrolls to percentage
Exit IntentShow when user moves to leave
Button ClickShow when button is clicked

Step 4: Copy Embed Code

Your code will look like:

<script
  src="https://ai4shops.com/embed/modal.js"
  data-modal-id="your-modal-id"
  data-trigger="exit-intent"
></script>

Step 5: Add to Website

Paste the script before </body> in your HTML:

<!DOCTYPE html>
<html>
  <body>
    <!-- Your content -->
 
    <!-- ai4shops.com Modal -->
    <script
      src="https://ai4shops.com/embed/modal.js"
      data-modal-id="your-modal-id"
      data-trigger="delay"
      data-delay="5000"
    ></script>
  </body>
</html>

Button Trigger Example

To show modal on button click:

<!-- Your button -->
<button onclick="ai4shops.showModal('your-modal-id')">
  Subscribe to Newsletter
</button>
 
<!-- Modal script (only once per page) -->
<script
  src="https://ai4shops.com/embed/modal.js"
  data-modal-id="your-modal-id"
  data-trigger="manual"
></script>

Making Modal Public

By default, modals are private. Make them public for embedding.

Screenshot: Public toggle in settings

File: /_static/guides/modal-designer/public-toggle-en.png

Step 1: Open Modal Settings

Click the settings icon on your modal.

Step 2: Toggle Public Status

Find the "Public" or "Published" toggle and enable it.

Step 3: Save Changes

Click "Save" to apply.

Security Note: Public modals can be accessed by anyone with the embed code. Ensure your allowed origins are configured to prevent unauthorized use.


Best Practices

Design Tips

  • Keep it simple - One clear call-to-action per modal
  • Mobile-first - Test on mobile devices
  • Fast loading - Optimize images
  • Clear close button - Don't trap users

Timing Tips

  • Don't interrupt immediately - Wait 5-10 seconds
  • Exit intent works - But don't overuse it
  • Respect "No thanks" - Don't show again immediately

Conversion Tips

  • Offer value - Discount, free resource, exclusive content
  • Minimize fields - Email only for newsletters
  • Social proof - "Join 10,000+ subscribers"

Troubleshooting

  1. Check that modal is set to Public
  2. Verify your domain is in Allowed Origins
  3. Check browser console for errors
  4. Ensure trigger conditions are met

Form Submissions Not Saving

  1. Verify modal is connected to a form
  2. Check field name mappings match
  3. Ensure form is active

Styling Issues

  1. Clear browser cache
  2. Check for CSS conflicts on your site
  3. Try embedding in incognito mode

What's Next?

Form Builder

Create forms to store modal submissions

View

AI Chatbot

Add intelligent chat to your website

View