Overview
OneSignal offers two in-app message editors:- Drag & Drop GUI for non‑technical creators
- HTML Editor for developers who want pixel‑perfect control over layout, behavior, and responsiveness.

Image illustrating code in-app code beside a rendered in-app
- Layouts: Build complex responsive layouts (e.g., side‑by‑side CTAs).
- Forms: Collect inputs inline (email, feedback, survey).
- Fonts & Brand: Use custom web fonts and CSS variables.
- JS Actions: Track clicks, tag users, send outcomes, and more.
Requirements
- iOS: 3.9.0+
- Android: 4.6.3+
- If your app uses an older SDK, in-app messages will render in a Center Modal layout instead.
Create & preview an HTML In‑App
Go to Messages > New In-App to create, edit, test, pause, duplicate, or delete your in-app messages.HTML Templates
Start quickly with pre-built templates.
In-app JavaScript Library
Use our JavaScript library to track interactions and trigger in-app behaviors.

Image showing the HTML Editor beside the preview
Add trackable labels
Adddata-onesignal-unique-label
on interactive elements so clicks are tracked and actionable.
Bind click actions with JavaScript
Learn more in the In-App JS Library documentation.
Asset support
Assets load at render time from the URLs you provide.Personalization
Dynamically insert user data values using Liquid syntax:- Text inside elements like
div
,p
,li
- Inside
<style>
blocks - In attributes
href
,src
,action
, anddata
- Inside
<script>
tags - Across complex nested content where parsing becomes ambiguous e.g.:
Accessibility & responsive design
Use CSS media queries and platform typography to adapt to device size and OS text settings.Safe areas (notches, home bars)
Modern devices have safe areas (like notches or home bars). Usesafe-area-inset-*
variables to pad your layout:
Embedding videos
You can embed videos (e.g., YouTube, Vimeo) directly in your in-app messages using<iframe>
.This is useful for demos, promos, or onboarding flows. Most browsers only allow autoplay if the video starts muted, so always include
&mute=1
in the embed URL.
Autoplaying video can impact performance. Keep videos short, and avoid multiple autoplay embeds in a single in-app.
Example: Autoplay YouTube embed
The snippet below shows how to center a YouTube video in the middle of the in-app with a fixed size (560×315):Understanding autoplay behavior
- The embed URL (/embed/VIDEO_ID) is required for autoplay — normal watch?v= links won’t work.
- Adding ?autoplay=1&mute=1 ensures the video plays automatically and complies with browser autoplay rules.
- The allow=“autoplay; encrypted-media” attribute grants permission for autoplay.
- The .video-box uses a fixed 560×315px size (YouTube’s default 16:9) so the video appears contained instead of stretching full screen.
- The body is set as a flex container with justify-content: center and align-items: center to position the video box in the exact middle of the screen.
Performance tips
- Prefer inline critical CSS; defer heavy scripts.
- Optimize images (dimensioned
<img>
withobject-fit
), use modern formats when possible. - Keep HTML payloads concise; avoid large base64 blobs.
- Use system fonts or host performant web fonts with
font-display: swap
. - Reduce file sizes and use proper resolution:
- Apple image guidelines
- Android image overview
- OneSignal has no affiliation with imagekit.io, though it’s a helpful tool for optimization.
Test across devices
Send test messages frequently to confirm behavior and layout across device types. See Find & set test subscriptions.FAQ
Can I remove the gray background or drop shadow from banner-style in-apps?
Yes. For top/bottom banners, update your SDKs and set: iOS 5.1.5+Can I reuse in-app templates from other providers?
Yes. Paste your HTML into the editor and replace analytics/actions with the OneSignal In‑App JS methods.I don’t have templates. How do I start?
Use the provided starter template or browse available templates. Some HTML/CSS experience is recommended.What SDK version is required?
- iOS: 3.9.0+
- Android: 4.6.3+