Skip to main content
The Inbox component supports conditional display of notifications using the renderNotification prop. This function receives the full notification object and returns a custom React element. You can use workflow data such as tags, identifiers, data object or notification severity to control how notifications are displayed in the notification UI. This lets you create dynamic, personalized notification UI for your subscribers.
Use your application’s existing connection and authentication settings with these examples. Set up Inbox covers the application identifier, subscriber, API and WebSocket URLs, and subscriber credentials.

Display notifications based on workflow tags

You can conditionally display customized notification based on workflow tags. These tags are defined in your workflow and are accessible via notification.tags property.
Inbox filters use the tags copied onto the notification at create time. Changing workflow tags later does not update historical notifications. See Tags.

Display notifications based on workflow identifier or name

Each workflow has a name and a unique identifier, accessible through notification.workflow.name and notification.workflow.identifier, respectively. Either property can be used to conditionally render notifications.

Display notifications based on data object

You can also use values from the notification data object to render notifications conditionally. These values are accessible via notification.data and typically contain custom payload fields.

Display notifications based on notification severity

You can access the severity field on each notification object. This enables conditional rendering in custom UIs.