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

# Create an in-app popup template

> Build an in-app popup from blocks, then select the saved template in a campaign or user journey.

## Overview

Build an in-app popup by arranging blocks in Notifly's visual editor.

## Minimum SDK versions

To display these popups, use the Notifly SDK version listed for your platform, or a later version.

* Android - 1.17.0
* iOS - 1.17.0
* Flutter - 1.11.0
* React Native - 3.9.0

> [!NOTE]
>
> Personalized text requires Notifly SDK **1.24.0** or later for Android, **2.8.0** or later for iOS, **2.6.0** or later for Flutter on both platforms, or **4.5.0** or later for React Native. Older SDKs do not display popups that contain personalization. The standard minimum versions above apply to popups without personalization.

## Create a template

In the sidebar, go to **Message Templates > In-App Popup Templates**.

![In-app popup template list](https://mintcdn.com/notifly/0_mniRtlC78csfem/images/i18n/en/in-app-message/popup-template.png?fit=max\&auto=format\&n=0_mniRtlC78csfem\&q=85\&s=4c7f34a5a7998992784758e707dd5d0d)

If you’re using the legacy editor, click **Use latest editor**. Then click **Create New Template**.

![Template creation dialog](https://mintcdn.com/notifly/0_mniRtlC78csfem/images/i18n/en/in-app-message/popup-new.png?fit=max\&auto=format\&n=0_mniRtlC78csfem\&q=85\&s=173217abe3992b04ce6fd60ebb3b8337)

Choose a layout, or select **Start from scratch** to build the template from a blank canvas.

## Editor layout

![Editor with the toolbar, block panel, canvas, and settings panel](https://mintcdn.com/notifly/0_mniRtlC78csfem/images/i18n/en/in-app-message/editor-basic.png?fit=max\&auto=format\&n=0_mniRtlC78csfem\&q=85\&s=7fe28bacc2687c83bab32483ae4b128b)

The **top toolbar** has a template name field and controls to undo, redo, preview, and save.

Use the **left panel** to add a block. Image, Text, Button, Divider, Spacer, and HTML add content. Row lays out columns. Carousel and Indicator work with slides.

The **canvas** shows the popup as you edit. Use the device and resolution menus at the top to see how it looks at different screen sizes, including mobile, tablet, and desktop.

The **right panel** shows the style settings for the selected block. When you clear the selection, the panel shows settings for the entire popup.

## **Add a block**

Select a block in the left panel to add it to the canvas. Click it on the canvas to show its blue outline and toolbar.

![Toolbar for a selected block](https://mintcdn.com/notifly/0_mniRtlC78csfem/images/i18n/en/in-app-message/toolbar.png?fit=max\&auto=format\&n=0_mniRtlC78csfem\&q=85\&s=d25126c0261171eed65e3ac61fed4850)

* Use **Move up** or **Move down** to reorder the block.
* Use **Duplicate block** to make a copy with the same settings.
* Use **Delete block** to remove it.

![Block selected on the canvas](https://mintcdn.com/notifly/0_mniRtlC78csfem/images/i18n/en/in-app-message/block.png?fit=max\&auto=format\&n=0_mniRtlC78csfem\&q=85\&s=39b75b1994d7b53e52cd7663e6224fe0)

### **Content blocks**

Add an **Image** block, then upload the image in the right panel. Set the width as a percentage. For height, choose automatic sizing or set an aspect ratio. You can also set the corner radius, margin, click action, and alternative text.

Image URLs and click actions in Image blocks don't accept personalization variables.

Enter the text for a **Text** block in the right panel. Set the font, size, line height, weight, color, and alignment for the block. To format part of the text, select it and use the bold, italic, underline, or color controls.

To insert a user's name or event data, add a personalization variable.

1. Select the **Text** block and place the cursor in **Text content** where you want to insert the variable.
2. Click **Personalization Variable** below the field.
3. Set the **Variable Type** and **Variable Name**. Under **Default Value (Optional)**, enter what to show when the variable has no value.
4. Click **Paste** to insert the Liquid expression at the cursor.

![Personalization settings showing the name property and its default value in Korean](https://mintcdn.com/notifly/0_mniRtlC78csfem/images/i18n/en/in-app-message/variable-input.png?fit=max\&auto=format\&n=0_mniRtlC78csfem\&q=85\&s=87eebebf2ccd6731583022eb198d4b15)

For example, choose **User** as the variable type and enter `name` as the variable name. Enter `there` as the default value to show "Hi there!" if the user's name is missing. The screenshot uses the Korean fallback `고객` (customer).

```liquid theme={null}
Hi {{ user["name"] | default: "there" }}!
```

![Text block with a personalization variable. The canvas shows the Liquid expression before substitution.](https://mintcdn.com/notifly/0_mniRtlC78csfem/images/i18n/en/in-app-message/text-example.png?fit=max\&auto=format\&n=0_mniRtlC78csfem\&q=85\&s=3f817cf6fbb315734aa0e87483d6db27)

You can also enter Liquid directly. See [Message personalization basics](https://docs.notifly.tech/en/user-guide/campaigns/personalization/basic.md) for supported data and syntax.

Add a **Button** block and set its label, background color and opacity, corner radius, border, font style, text color, alignment, and padding. The default click action is **Close**. Choose **Open link** to open a URL or deep link.

To personalize the button text, choose **Personalization Variable** in **Content > Label**. To personalize a URL or deep link, choose **Open link** under **Click action** and use **Personalization Variable** in the **Link** field.

Use a **Divider** block to add a line between sections.

Use a **Spacer** block to add space between blocks.

Use an **HTML** block for content that needs custom HTML and CSS. From an HTML element's event handler, you can call `notiflyPopup` methods to close the popup, open a link, or control a carousel.

Click **Personalization Variable** in the HTML field to insert a variable. Enter Liquid directly to write conditions or loops, read from [a catalog](https://docs.notifly.tech/en/user-guide/catalogs/guide.md), or use [Connected Content or `abort_message`](https://docs.notifly.tech/en/user-guide/campaigns/personalization/advanced). When `abort_message` runs, the popup doesn't appear.

#### Call `notiflyPopup` methods

Call methods from the `onclick` attribute of an HTML element, as shown below.

```html theme={null}
<button onclick="notiflyPopup.openDeepLink('myapp://product/123')">
  View product in the app
</button>

<button onclick="notiflyPopup.hideForDays(7)">
  Hide for 7 days
</button>
```

| Method | Description |
| - | - |
| `notiflyPopup.close()` | Closes the popup. |
| `notiflyPopup.hideForDays(days)` | Closes the popup and hides it for the specified number of days. |
| `notiflyPopup.hideForever()` | Closes the popup and prevents it from appearing again. |
| `notiflyPopup.openUrl(url, options?)` | Opens a URL. For HTTP and HTTPS URLs, set `openMode` to `current` to open the link in the in-app browser, or use `new_tab` to open it in an external browser. The default is `new_tab`. Use `openDeepLink()` for app deep links. |
| `notiflyPopup.openDeepLink(url)` | Opens the specified deep link. |
| `notiflyPopup.nextSlide()` | Moves to the next slide in the carousel. |
| `notiflyPopup.prevSlide()` | Moves to the previous slide in the carousel. |
| `notiflyPopup.goToSlide(index)` | Moves to the slide at `index`. The first slide has index `0`. |

#### Identify which button a user clicked

In the **Button** block settings, enter a name in the field marked `button_name`. Notifly includes the name in the click event. Give each button a different name if you want to track clicks separately.

| Example button name | Button action | Event | Event parameters |
| - | - | - | - |
| `coupon_cta` | Open a URL or deep link | `notifly__main_button_click` | `button_name = coupon_cta`, `campaign_id = aB3dE7` |
| `close_popup` | Close | `notifly__close_button_click` | `button_name = close_popup`, `campaign_id = aB3dE7` |
| `dismiss_today` | Do not show again or Hide for N days | `notifly__hide_in_app_message_button_click` | `button_name = dismiss_today`, `campaign_id = aB3dE7` |

### **Layout blocks**

A **Row** block puts two to four columns side by side. Set the width of each column as a proportion of the row, then set vertical alignment and block spacing. You can also set the background color, opacity, and outer margin. Add blocks such as **Image**, **Text**, or **Button** to each column.

### **Carousel blocks**

Add a **Carousel** to display slides. Each popup can contain one carousel. Select the carousel to open its settings in the right panel.

* **Slide management**. Add a slide or select an existing one to reorder, duplicate, or delete it.
* **Slide transition**. Choose an animation (Slide, Fade, or None) and decide whether to allow swiping or looping.
* **Autoplay**. Turn on automatic slide transitions and set the time between slides.
* **Indicator**. Choose dots or a slide number. Set the position, offsets, size, and spacing. For dots, set the colors of the active and inactive dots. For a slide number, set the text and background colors.

Add an **Indicator** block to place the carousel indicator elsewhere in the popup.

## **Popup settings**

Click an empty part of the canvas or click **Popup** at the top of the right panel to edit the settings for the entire popup.

### **Popup type**

* **Dialog** appears in the center of the screen. This is the default.
* **Bottom Sheet** slides up from the bottom of the screen.
* **Full Screen** fills the screen.

### **Background**

Set the background color, opacity, or image of the popup content area.

### **Popup style**

Set the padding and block spacing. If the popup type supports it, set the maximum width and corner radius in pixels. Switch to individual inputs to set a different radius for each corner or different padding for each side.

### **Overlay**

For a dialog or bottom sheet, set the overlay color and opacity. Turn on **Close on click** to close the popup when the user clicks the overlay.

### **Animation**

Set **Enter animation** and **Exit animation** separately. For each, choose **None**, **Fade**, **Slide Up**, **Slide Down**, **Slide Left**, or **Slide Right**.

### **Close button**

Choose whether to show the close (X) button. Set the corner (top left or top right), placement (inside or outside the popup), size in pixels, stroke weight, icon color, and horizontal and vertical offsets.

## **Save and use the template**

Click **Save** in the toolbar. To use a template from **In-app Popup Templates**, select it when you set up a campaign or user journey.

When you save a template containing personalization variables, Notifly enables personalization automatically. When the popup appears, Notifly fills in the variables with user or event data.

> [!NOTE]
>
> **Preview** shows the Liquid expression before Notifly fills in the actual values. To test what users will see, run a campaign for test users only. Trigger the configured event in an app that uses a supported SDK version.

## **FAQ**

> [accordion] Does changing the popup type reset my settings?
>
> Blocks and their content stay in place. Some style settings may reset, depending on the new type. Choose a type before editing the individual styles.

> [accordion] How many slides can I add to a carousel?
>
> There is no slide limit. Use about three to five slides so users can browse them easily.

> [accordion] Can I add a font?
>
> At the bottom of the font list, click **Add font**. In Google Fonts, select a font and click **Get font**, then **Get embed code**. Copy the URL that starts with `https://fonts.googleapis.com/` and paste it into **Webfont URL**. In **Font name**, enter the exact name shown in Google Fonts. Click **Load font**, then **Add**.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.