showInAppNotification( )


Displays an in-app notification.

developer preview tag

Use in-app notifications to provide real-time updates and alerts without interrupting the app user's experience. In-app notifications are displayed at the top of the app, and are often used to inform app users of new information.

Method Declaration
Copy
function showInAppNotification(
  body: string,
  options: InAppNotificationOptions,
): Promise<InAppNotificationResult>;
Method Parameters
bodystringRequired

Message to be displayed in notification.


optionsInAppNotificationOptions

In-app notification options.

Returns
Return Type:Promise<InAppNotificationResult>
Display an in-app notification
JavaScript
import { appFramework } from "wix-mobile"; import { openSendWelcomeModal } from "./sendWelcome"; appFramework .showInAppNotification("@newMember just joined your study group", { title: "New community member", avatarImage: "https://static.wixstatic.com/media/w8ide0_leac4pwk8o11v8725j9ugcbe70x3alc0~mv2.jpg", }) .then((res) => { if (res.result === "pressed") { openSendWelcomeModal(); } }) .error((error) => { console.error(error); });
Did this help?