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

# HTML Nudge Templates

> Use HTML nudge templates in MoEngage to show non-intrusive in-app messages at the top or bottom of the screen without blocking user interactions.

Nudges are non-intrusive templates embedded within the app at the top or bottom or appearing on the screen. Unlike pop-ups, they allow your users to continue interacting with the app. You can use these templates to alert users about new information, sale days, and similar updates.

The In-app HTML editor offers customizing [pre-built nudge templates](#h_01JM9AFRX8GZ7VS4X08G5WRBEB) and [creating nudge templates](#h_01JJBQ5BEWN6C6WP3HXTJ1EBT1) from scratch.

<Tip>
  HTML nudge templates are supported for the following SDKs:

  * In-App Android SDK version 8.8.0 or later
  * In-App iOS SDK version 6.00.3 or later
</Tip>

# Pre-Built Nudge Templates

Perform the following steps to find and use the pre-built HTML nudge templates:

1. In the **Content** section of the campaign creation page, select the filters shown below to find the pre-built HTML nudge templates. <img src="https://mintcdn.com/moengage/ME-DtlELD2N8TrcF/images/moengage_bfd0d6.png?fit=max&auto=format&n=ME-DtlELD2N8TrcF&q=85&s=70f3de5ba74243e851432e22b40034af" alt="Screenshot 2025-02-19 at 12.21.13 PM.png" width="490" height="1354" data-path="images/moengage_bfd0d6.png" /> MoEngage provides the following pre-built HTML nudge templates to help you get started:
   * [Nudge - Emoji rating](#h_01JMEGTVFY4EZCCD0K4TDRKAJ6)
   * [Nudge - Notification with two buttons](#h_01JMEXQASKKV1YE4EBRZ3A6HDE)
   * [Nudge - Feature announcement](#h_01JMEZ8Y8954AVSF53EHYDFZJT)
   * [Nudge - Countdown timer](#h_01JMF0B4GK74C2Q8KG8VF6K0WY) <img alt="Screenshot 2025-02-17 at 11.40.14 AM.png" src="https://mintcdn.com/moengage/TTNPRzWn21XF5uj0/images/moengage_f9acb9.png?fit=max&auto=format&n=TTNPRzWn21XF5uj0&q=85&s=7df57c2cc2c74402ccb334fdac90e9ea" width="3178" height="1142" data-path="images/moengage_f9acb9.png" />
2. Hover over a desired template and click **Select Template**. The HTML code of the template is populated in the **Code View** section, where you can edit the template's elements. <img src="https://mintcdn.com/moengage/S2vOz7ciYYqlhjCf/images/moengage_6b7562.png?s=12d07096eb98c76171f92b7be3f655a4" alt="2025-02-19_12-34-36 (1).gif" width="1584" height="696" data-path="images/moengage_6b7562.png" />

## Nudge - Emoji Rating

You can use this template to collect feedback from your users. By default, it has emojis for rating and a button to submit feedback.

<img alt="Screenshot 2025-02-19 at 12.43.44 PM.png" src="https://mintcdn.com/moengage/cVruC-B7I1TnIZ0h/images/moengage_db2b8e.png?fit=max&auto=format&n=cVruC-B7I1TnIZ0h&q=85&s=a40f5204db40c814bc29241e77dab09c" style={{ width:"36%" }} width="684" height="1150" data-path="images/moengage_db2b8e.png" />

You can make the following changes to the elements in the **Code View** of the HTML template:

* **Change color**: You can specify custom color codes for various elements. Scroll to lines **159** and **170** of the HTML code and replace them with the color codes of your liking, as shown below, to modify the background color of the nudge container and the submit button, respectively. <img alt="2025-02-19_15-43-37 (1).gif" src="https://mintcdn.com/moengage/UX7SFw6G5JwoHWFq/images/moengage_63ab43.png?s=3c013164016f5ed521bd819333bbecd5" width="1552" height="724" data-path="images/moengage_63ab43.png" />
* **Change emojis**: You can change the emojis and their feedback message by modifying the values under `const emojiData` on line **177**. <img alt="Screenshot 2025-02-19 at 3.59.47 PM.png" src="https://mintcdn.com/moengage/E3HJVtaUzhrzFckK/images/moengage_90b65c.png?fit=max&auto=format&n=E3HJVtaUzhrzFckK&q=85&s=dcefaf4945440d5b04e58a2803be5fcd" width="2236" height="910" data-path="images/moengage_90b65c.png" />
* **Track data**: Clicks and data tracking have been added by default to the template. If you add more buttons, make sure to add click tracking. For more information about tracking, refer [here](/developer-guide/components-for-sdk/javascript-bridge/javascript-bridge-for-html-in-apps). <img alt="Screenshot 2025-02-19 at 4.24.59 PM.png" src="https://mintcdn.com/moengage/TTNPRzWn21XF5uj0/images/moengage_fc83e1.png?fit=max&auto=format&n=TTNPRzWn21XF5uj0&q=85&s=b127536750f05de813770523196dc043" width="2274" height="108" data-path="images/moengage_fc83e1.png" />

## Nudge - Notification with Two Buttons

You can use this template to nudge users about a new offer. By default, the template contains a text body and two buttons.

<img alt="Screenshot 2025-02-19 at 4.29.03 PM.png" src="https://mintcdn.com/moengage/50ZszvUJB4M_6y_L/images/moengage_e86e5f.png?fit=max&auto=format&n=50ZszvUJB4M_6y_L&q=85&s=fc98acbe0e739560d10f205023327901" style={{ width:"38%" }} width="690" height="1178" data-path="images/moengage_e86e5f.png" />

You can make the following changes to the elements in the **Code View** of the HTML template:

* **Change color**: You can specify custom color codes for various elements. Scroll to line **172** of the HTML code and replace the color codes in the highlighted places below to modify the colors of the elements. <img alt="Screenshot 2025-02-19 at 4.32.59 PM.png" src="https://mintcdn.com/moengage/DUgG020WbtkVK2Ls/images/moengage_33c9f3.png?fit=max&auto=format&n=DUgG020WbtkVK2Ls&q=85&s=263f7c3ac8c8803e6508c5075e95c5dc" width="3146" height="1322" data-path="images/moengage_33c9f3.png" />
* **Edit links**: On line **201**, you can modify the link assigned to the **BUY MEMBERSHIP NOW** button, which redirects the user to a custom URL. <img alt="Screenshot 2025-02-19 at 4.37.32 PM.png" src="https://mintcdn.com/moengage/S2vOz7ciYYqlhjCf/images/moengage_6b43e1.png?fit=max&auto=format&n=S2vOz7ciYYqlhjCf&q=85&s=1316cf3c8978c93114965f9aef949a2f" width="2256" height="164" data-path="images/moengage_6b43e1.png" />

## Nudge - Feature Announcement

You can use this nudge template to spotlight a new feature on your app. By default, this template contains a text body and a button.

<img alt="Screenshot 2025-02-19 at 4.59.21 PM.png" src="https://mintcdn.com/moengage/o0kXRAcOq2mxzDnY/images/moengage_f00e4f.png?fit=max&auto=format&n=o0kXRAcOq2mxzDnY&q=85&s=b882500d6e33d1f7f21ba3b419f1b7e7" style={{ width:"41%" }} width="692" height="1158" data-path="images/moengage_f00e4f.png" />

You can make the following changes to the elements in the **Code View** of the HTML template:

* **Change color**: You can specify custom color codes for various elements. Replace a color code, as shown below, to modify the colors of the elements.
* **Change text**: You can also edit the text body on line **163** based on your needs. <img alt="2025-02-19_17-10-27 (1).gif" src="https://mintcdn.com/moengage/2CGhjk8ZDWEC5ocb/images/moengage_f91953.png?s=fc59e3149971a1472f30ba630205bb26" width="1552" height="642" data-path="images/moengage_f91953.png" />
* **Adjust**: You can adjust the nudge size based on the content of the nudge, as shown below. <img alt="2025-02-19_17-05-08 (1).gif" src="https://mintcdn.com/moengage/xaH8HoR16_YVDek5/images/moengage_cdca02.png?s=46fee61e99deb44f92a789c899981d6d" width="1554" height="700" data-path="images/moengage_cdca02.png" />

## Nudge - Countdown Timer

You can use this nudge template to create a sense of urgency among your users for sale days. By default, this template contains a countdown timer with text.

<img alt="Screenshot 2025-02-19 at 5.14.38 PM.png" src="https://mintcdn.com/moengage/SBG7um9Fqotw1CFo/images/moengage_b52dcb.png?fit=max&auto=format&n=SBG7um9Fqotw1CFo&q=85&s=bd76e964eb1a77f0c35aefbcd6349f12" style={{ width:"43%" }} width="698" height="1174" data-path="images/moengage_b52dcb.png" />

You can make the following changes to the elements in the **Code View** of the HTML template:

* **Change color**: You can specify custom color codes for various elements. Scroll to line **93** of the HTML code and replace color codes in the highlighted places below to modify the colors of the elements. <img alt="Screenshot 2025-02-19 at 5.20.43 PM.png" src="https://mintcdn.com/moengage/xjBZUVmmH3jDrySH/images/moengage_c491d9.png?fit=max&auto=format&n=xjBZUVmmH3jDrySH&q=85&s=acce47023ccd74becb757bf2e945438b" width="3098" height="1306" data-path="images/moengage_c491d9.png" />
* **Modify timer**: You can modify the timer on line **108** based on your needs, as shown below. <img alt="2025-02-19_17-28-06 (1).gif" src="https://mintcdn.com/moengage/60BzFdXTJDO5dnCb/images/moengage_3956b6.png?s=976fd19796581f111a85fc45327cb0e8" width="1540" height="710" data-path="images/moengage_3956b6.png" />

# Create Nudge Template

Perform the following steps to create a nudge template:

1. On the **Content** section of the campaign creation page, click the **Start from scratch** tab. <img src="https://mintcdn.com/moengage/geRh9DNA2GhPhrjA/images/moengage_f19e5c.png?fit=max&auto=format&n=geRh9DNA2GhPhrjA&q=85&s=105ef6f70271273a21abeefdebe1c2b9" alt="Screenshot 2025-01-27 at 2.59.37 PM.png" width="3094" height="1278" data-path="images/moengage_f19e5c.png" />

You can create a template using the following options:

* [Custom HTML upload](#h_01JJBQHFZFB4A7WA027EY33MGK)
* [Zip upload](#h_01JJBQHZTJDT1KP9TZF3MFS2Q3)

2. Hover over **Custom HTML upload** or **Zip upload** and click **Create nudge**, as shown below.
   <img src="https://mintcdn.com/moengage/_fazdN5K6hQMBuV9/images/moengage_39dc40.png?s=050776b1a7c2bb5f01bd264008267835" alt="2025-02-17_11-31-26 (1).gif" width="1602" height="440" data-path="images/moengage_39dc40.png" />

## Custom HTML Upload

Follow the steps outlined to create a nudge using custom HTML:

1. Hover over **Custom HTML Upload** and click **Create nudge**. You will be redirected to the **Code View** editor section.
2. Use your custom HTML code in the **Code View** section and upload assets as needed.

<img src="https://mintcdn.com/moengage/_fazdN5K6hQMBuV9/images/moengage_3a098f.png?s=3bb5e3231249d67b5a9a23c47cdf63b5" alt="2025-02-17_11-33-13 (1).gif" width="1598" height="640" data-path="images/moengage_3a098f.png" />

## Zip upload

Using this method, you can upload your HTML and assets together as a single ZIP file.

<Info>
  Ensure to follow the guidelines mentioned below before uploading your file:

  * Ensure that your .zip file is less than 5MB.
  * Files inside the Zipx should not contain \*, /, `\`, &, \~, \&quote; in their names.
  * All images should be in JPG, JPEG, PNG, or SVG formats.
  * You cannot upload GIF files, but you can add them to the template via URLs.
  * The relative path specified for images should match the zip folder structure, including case sensitivity.
</Info>

Perform the following steps to create a nudge using Zip upload:

1. Hover over **Zip Upload** and click **Create nudge.** The **Zip template** dialog box appears.
2. Drag and drop your ZIP file or upload it from your computer and click **Done**.

<img src="https://mintcdn.com/moengage/t_8awpRKFC9RNHlT/images/moengage_a87fdd.png?s=a2a5b2965f738ca9e5c82fabe3e91727" alt="2025-02-17_11-38-10 (1).gif" width="1600" height="652" data-path="images/moengage_a87fdd.png" />

# Customize the Nudge Template

Once you have uploaded your HTML code or the zip file, you can customize your nudge template for orientation, position, device types, and more. To customize, click **Template Settings**.

<img src="https://mintcdn.com/moengage/4hNKOAjPrnhpJB2_/images/moengage_7f2a9b.png?s=80afa29031a71499ee163be9827dfe25" alt="2025-01-27_15-17-47 (1).gif" width="1558" height="756" data-path="images/moengage_7f2a9b.png" />

You can perform the following actions in the **Template Settings** section:

* **Change orientation**: In the **Allowed Device Orientation** section, you can adjust the orientation type of the nudge.
  <img alt="Screenshot 2025-01-27 at 3.19.47 PM.png" src="https://mintcdn.com/moengage/_eUNBDpGCEXI_sgZ/images/moengage_a71659.png?fit=max&auto=format&n=_eUNBDpGCEXI_sgZ&q=85&s=e3b427d3489582ad9cc3ebfb8a19664e" style={{ width:"52%" }} width="454" height="160" data-path="images/moengage_a71659.png" />
* **Select device types**: In the **Allowed device types** section, you can select the required device type.
  <img alt="Screenshot 2025-01-27 at 3.21.04 PM.png" src="https://mintcdn.com/moengage/wIFGWsQFEjsz2j4v/images/moengage_e196e0.png?fit=max&auto=format&n=wIFGWsQFEjsz2j4v&q=85&s=f190c1e19e668282a9756546d4e3cb69" style={{ width:"51%" }} width="520" height="166" data-path="images/moengage_e196e0.png" />
* **Adjust placement and proportions**: In the **Placement and Proportions** section:
  * You can change the nudge placement to be on the **Bottom** or **Top**. <img src="https://mintcdn.com/moengage/t9nft78wsoLTI2Nx/images/moengage_2c9efd.png?s=a29457bd8d2189768251ca6905a1999b" alt="2025-01-27_15-22-30 (1).gif" width="1556" height="778" data-path="images/moengage_2c9efd.png" />
  * You can adjust the **Nudge height** and **Nudge width** to your liking. <img src="https://mintcdn.com/moengage/OQ0V9ibjQLpsyCSD/images/moengage_0e4d27.png?s=2b3dde4e11613d2f8cc9d96a897b1769" alt="2025-01-27_15-27-01 (1).gif" width="1556" height="784" data-path="images/moengage_0e4d27.png" />
  * You can change the position of your nudge under **Margin**. <img src="https://mintcdn.com/moengage/xaH8HoR16_YVDek5/images/moengage_cc499f.png?s=12f8577d4debeb63995e1cdf5a365a4d" alt="2025-01-27_15-31-17 (1).gif" width="1558" height="782" data-path="images/moengage_cc499f.png" />

For information on testing and previewing the template, refer to [HTML In-app Templates](/user-guide/campaigns-and-channels/in-app-message/templates/html-in-app-templates).
