Notification Center
The Notification Center is Notifizz’s in-app notification widget. It displays real-time notifications to your users as a bell icon with an unread badge and a dropdown list. All Notification Center SDKs (React, Angular, Vanilla JS) share the same underlying widget and expose the same capabilities through framework-idiomatic APIs. This page covers the concepts that apply across all of them.Widget lifecycle
Every frontend SDK follows the same lifecycle:- Load — The SDK injects the Notifizz widget script into the page.
- Authenticate — The widget authenticates the user based on your
authTypeconfiguration. - Ready — The widget signals it is ready to display notifications. The
isReadystate becomestrue. - Active — The widget listens for real-time updates and keeps the notification list current.
- Destroy (optional) — The widget is removed from the DOM and all listeners are cleaned up.
Positioning
Control where the bell icon appears using theposition option:
| Value | Description |
|---|---|
top-right | Upper-right corner of the viewport |
top-left | Upper-left corner of the viewport |
bottom-right | Lower-right corner of the viewport |
bottom-left | Lower-left corner of the viewport |
Styling
Fine-tune the placement of the bell and the notification center with style options:Bell styles
Notification Center styles
State model
All SDKs expose the sameNotifizzState object:
| Property | Type | Description |
|---|---|---|
isReady | boolean | true once the widget has loaded and authenticated. |
isOpen | boolean | true when the notification center dropdown is open. |
unreadCount | number | The current number of unread notifications. |
lastUpdated | number | Timestamp (ms) of the last state change. |
hasError | boolean? | true if the widget encountered an error. |
errorCode | string? | Error identifier, if applicable. |
How to access state
- React
- Angular
- Vanilla JS
Programmatic control
All SDKs let you open, close, and toggle the notification center programmatically:| Method | Description |
|---|---|
open() | Opens the notification center |
close() | Closes the notification center |
toggle() | Toggles the notification center open or closed |
Custom bell
Every SDK supports replacing the default bell icon with your own UI element. The approach varies by framework:- React —
renderBellprop with a render function receivingNotifizzBellContext. - Angular — Content projection via
ng-contentwith a#customBellIcontemplate reference. - Vanilla JS —
setBellElement()method that attaches click handling and unread data attributes.
Default URLs
The widget connects to these endpoints by default:| Option | Default value |
|---|---|
serverUrl | https://widget.notifizz.com |
apiUrl | https://eu.api.notifizz.com/v1 |
widgetPath | /v1/widget.js |
Authentication options
All frontend SDKs accept the same authentication fields:| Option | Type | Required | Description |
|---|---|---|---|
apiKey | string | Yes | Your Front API Key from the dashboard. |
authType | 'firebase' | 'backendToken' | 'none' | Yes | Authentication strategy. |
token | string | For firebase and backendToken | The auth token. |
userId | string | For backendToken and none | The user’s unique identifier. |
userEmail | string | For backendToken and none | The user’s email address. |
Next steps
React SDK
Full API reference
Angular SDK
Full API reference
Vanilla JS SDK
Full API reference