Inbox Components
Learn how to use the different components of the Inbox
Components
The Inbox is composed of the following components:
Inbox
It renders an opinionated <Inbox />
with a bell button, that triggers a popover on lock. The popover contains the notifications list and the user preferences.
Default Inbox
Controlled Popover state
Custom Notification item
Customize the notification item by passing a render function to the renderNotification
prop.
You can access the notification object and render the notification item as per your requirements.
The notification.data
property allows you acessing the custom information while rendering notification item.
You can check how to pass it with the Novu Framework in-app step output here.
Custom Bell
Handle notification click
Redirect on the notification click
The redirect
object allows to define the URL to visit when clicking on the notification item.
The value will be implicitly passed to the notification and used when click event happens.
Handle notification button clicks
Redirect on the notification action button click
The redirect
object on the primaryAction
or secondaryAction
prop allows to define the URL to visit when clicking on the notification action button.
The value will be implicitly passed to the action buttons and used when click event happens.
Bell
The Bell
component is used to display the notification bell icon. It can be used to show the number of unread notifications.
Custom Bell
You can pass custom components as children to the Bell
component to render the custom bell icon.
Notifications
The Notifications
component is used to display the list of notifications.
Notifications as a list without the Bell and Popover
Notifications as a list with custom Notification item
Preferences
The Preferences
component is used to display the preferences. It can be used to show the preferences.
Use the Preferences
component to show the preferences without the bell and popover.
Bring your own Popover
component allows you to bring your own popover component along with custom components. Below is an example of how you can bring your own popover component with Radix UI.
Was this page helpful?