Skip to main content
The Notification Center Web Component is a custom element that can be used in any web application. It is built by wrapping the React components and consists from its core the three pieces:  NovuProviderPopoverNotificationCenter, and  NotificationBell combined together into one.

ESM module

Make sure that you have installed the @novu/notification-center package:
Then, import the web component and register it as a custom element:
After that, you can use the web component in your HTML:
Please note: that the properties are named with a kebab-case in the HTML, but depending on the technology you use it might be a camelCase, for ex. Vue/Angular props are bound with variables using that convention.

Example

CodeSandBox Link 🔗

Bundled version (preview)

Sometimes you might not be able to use the ESM module, for example in the WordPress environment. In that case, you can use the bundled version of the Notification Center Web Component that is available on the CDN.

Example

CodeSandBox Link 🔗

Properties

The Notification Center Web Component has a few properties that you can use to customize the behavior of the component. The only required property is applicationIdentifier. If you are using TypeScript, then you might want to check the NotificationCenterComponentProps interface.

Limitations

It’s important to note that there are some limitations when using the Web Component compared to the React version:
  • You get an all-in-one component
  • It doesn’t support the children, header, footer, emptyState, listItem props
  • It’s a wrapped react component, which means a bigger bundle size (we are working on it to make it smaller)