Skip to main content
Use Inbox with workflows from the current Dashboard or @novu/framework.The legacy @novu/notification-center package, including its Angular, Vue, web component, iframe, and headless clients, is for legacy Dashboard workflows only.
Inbox replaces the legacy Notification Center. The notification object, action handlers, tabs, appearance, localization, and HMAC options are the same across hosts. The mount path differs by framework. Review the breaking changes, then use the React, Angular, Vue, or Vanilla JS section that matches your application.

Why you should upgrade

  • Appearance and layout options that replace the legacy styles API
  • A notification object that includes archive, snooze, severity, and action methods
  • A smaller client surface: @novu/react for React, @novu/js for every other host
  • Compatibility with current Dashboard workflows and @novu/framework

Breaking Changes

These changes apply to every host. React uses component props. Angular, Vue, and Vanilla JS pass the same fields to NovuUI options and mountComponent props.

Components

  • The PopoverNotificationCenter component has been replaced with the Inbox component.
  • The NotificationCenter component has been replaced with the Notifications component.
  • The NotificationBell component has been replaced with the Bell component.

Styling

  • The styles prop is replaced by an enhanced, easy to use appearance prop to customize the notification components. For more information on appearance customization, visit here.

Notification

  • Removal of seen, lastSeenDate, content, templateIdentifier, payload, cta properties from the Notification object.
  • Archive, snooze, and severity support were added to the Notification object.
Notification object
Types
The legacy _id is the notification identifier and is not the same value as transactionId, which identifies the workflow trigger.

Subscriber prop

The subscriberId prop is deprecated. Pass subscriber with either a subscriber ID string or a subscriber object.

Choose the Inbox package

There is no native Angular or Vue Inbox package. Those applications mount the same UI through @novu/js. React Native uses @novu/react-native. The breaking changes, tabs, appearance, actions, and notification methods on this page apply to every host. React uses component props. Angular, Vue, and Vanilla JS pass the same fields to NovuUI options and mountComponent props.

React

Uninstall @novu/notification-center and install @novu/react. Replace NovuProvider, PopoverNotificationCenter, and NotificationBell with <Inbox />. Use subscriber, not the deprecated subscriberId prop. The React examples below map the remaining components, fields, and handlers. For HMAC, localization, and layout, follow the React Inbox quickstart.

Angular

Uninstall the Angular Notification Center wrapper and install @novu/js. There is no native Angular Inbox package. Mount Inbox with NovuUI from @novu/js/ui on an existing header, navbar, or sidebar element. Use a template reference such as #novuInbox, mount in ngAfterViewInit, and unmount in ngOnDestroy. Pass appearance, tabs, localization, and click handlers in the constructor options or in mountComponent props. Follow the Angular Inbox quickstart for the install.

Vue

Uninstall the Vue Notification Center wrapper and install @novu/js. There is no native Vue Inbox package. Mount Inbox with NovuUI from @novu/js/ui from onMounted against a template ref, and unmount in onUnmounted. Inbox does not support server-side rendering. For Nuxt, wrap the component in <ClientOnly> and follow the Nuxt Inbox quickstart. Follow the Vue Inbox quickstart for the install.

Vanilla JS

Uninstall the web component, iframe embed, or @novu/headless client and install @novu/js. Mount Inbox with NovuUI from @novu/js/ui after DOMContentLoaded on an existing element. A bundler is required for the @novu/js/ui import. For a plain HTML page, follow the Vanilla JS Inbox quickstart, which loads the UI bundle and stylesheet. For a custom feed without the prebuilt UI, replace @novu/headless with @novu/js and rebuild queries, counts, and mutation methods against the current notification object. See the JavaScript SDK.

Basic usage

The examples below use @novu/react. For Angular, Vue, and Vanilla JS, pass the same options to NovuUI and the same handlers in mountComponent props.

Legacy implementation with @novu/notification-center

Current implementation with @novu/react

Notification center without bell icon

The @novu/react package introduces a flexible way to display notifications as a list without the default bell icon. Use the Inbox and Notifications components to achieve this functionality.

Legacy implementation with @novu/notification-center

Current implementation with @novu/react

Custom bell icon

Customize the bell icon that triggers the notifications popover using the renderBell prop.

Legacy implementation with @novu/notification-center

Current implementation with @novu/react

Notification actions

Handle user interactions with notifications effectively using the action handlers provided by @novu/react.

onNotificationClick

Trigger a callback function when a user clicks on a notification item.

Legacy implementation with @novu/notification-center

Current implementation with @novu/react

onPrimaryActionClick and onSecondaryActionClick

Handle primary and secondary actions within a notification explicitly.

Legacy implementation with @novu/notification-center

Current implementation with @novu/react

Avatar icons

In the legacy implementation, you could set a notification’s avatar icon by enabling the Add an avatar option in the workflow UI. Novu would then use the avatar field of the actor subscriber as the icon. In the new implementation, you can set the avatar icon for a notification by adding the avatar icon in the workflow UI. There are three options to choose from:
  • Use a default avatar icon.
  • Use a hard-coded avatar icon URL.
  • Use a payload variable to dynamically set the avatar icon.
For more information, refer to Icons.

Popover positioning

For advanced positioning and styling of the notifications popover, integrate third-party popover libraries such as Radix UI.

Legacy implementation with @novu/notification-center

Current implementation with @novu/react and Radix UI as an example

Custom notification item

Customize the appearance and structure of individual notification items using the renderNotification prop.

Legacy implementation with @novu/notification-center

Current implementation with @novu/react

Styling with appearance prop

Customize the overall look and feel of the notification components using the appearance prop, which supports both CSS objects and class names (including Tailwind CSS classes).

Legacy implementation with @novu/notification-center

Current implementation with @novu/react

For more information on appearance customization visit here.

Multiple tabs support

Organize notifications into different categories using tabs by leveraging the tags property in workflow definitions and the tabs prop in the Inbox component.

Create multiple tabs

Legacy implementation with @novu/notification-center

After defining the feeds on the workflow UI, you were able to filter notifications based on the feedIdentifier.

Current implementation with @novu/react

  1. Define multiple workflows with relevant tags.
Add tags on the workflow Tags field. One tag can be used for multiple workflows.
  1. Use those tags in the tabs prop of the Inbox component.
Each tab takes a filter object that supports tags, data, and severity. The older value array is deprecated, so replace value: ['security'] with filter: { tags: ['security'] }.

Localization

Customize the language and text content of the notification components using the localization prop. Refer to the localization documentation.

HMAC encryption

The process remains the same as before. For more information, refer to Secure your inbox with HMAC encryption.

Handling notifications

Legacy mutation hooks such as useUpdateAction are replaced by methods on the notification object. Each method returns a promise, so handle failures rather than assuming the change succeeded.
If you still have questions or need further assistance, please reach out to us at [email protected].