<InboxContent />
API Reference
Subscribers
- GETGet subscribers
- POSTCreate subscriber
- POSTBulk create subscribers
- GETGet subscriber
- PUTUpdate subscriber
- DELDelete subscriber
- PUTUpdate subscriber credentials
- DELDelete subscriber credentials by providerId
- PATCHUpdate subscriber online status
- GETGet subscriber preferences
- GETGet subscriber global preferences
- PATCHUpdate subscriber preference
- PATCHUpdate subscriber global preferences
- GETGet in-app notification feed for a particular subscriber
- GETGet the unseen in-app notifications count for subscribers feed
- POSTMark a subscriber feed message as seen
- POSTMarks all the subscriber messages as read, unread, seen or unseen. Optionally you can pass feed id (or array) to mark messages of a particular feed.
- POSTMark message action as seen
- GETHandle providers oauth redirect
- GETHandle chat oauth
Topics
Notification
Workflows
Workflow Overrides
Workflow groups
Integrations
Layouts
Execution Details
Organizations
<InboxContent />
By default, <InboxContent />
renders the content of the <Inbox />
popover. This component is meant to be used with a custom popover.
import { Bell, Inbox, InboxContent } from '@novu/react';
import { Popover, PopoverContent, PopoverTrigger } from '@/components/ui/popover';
export default function CustomPopoverPage() {
return (
<Inbox
applicationIdentifier="YOUR_APPLICATION_IDENTIFIER"
subscriberId="YOUR_SUBSCRIBER_ID"
>
<Popover>
<PopoverTrigger>
<Bell />
</PopoverTrigger>
<PopoverContent className="h-[500px] w-[400px] overflow-auto p-0">
<InboxContent />
</PopoverContent>
</Popover>
</Inbox>
);
}
Behaviour
The <InboxContent />
component can receive all the props that <Inbox />
does, besides the configuration and bell specific ones.
import { Bell, Inbox, InboxContent } from '@novu/react';
import { Popover, PopoverContent, PopoverTrigger } from '@/components/ui/popover';
export default function CustomPopoverPage() {
return (
<Inbox
applicationIdentifier="YOUR_APPLICATION_IDENTIFIER"
subscriberId="YOUR_SUBSCRIBER_ID"
>
<Popover>
<PopoverTrigger>
<Bell />
</PopoverTrigger>
<PopoverContent className="h-[500px] w-[400px] overflow-auto p-0">
<InboxContent
onNotificationClick={(notification) => {
// your logic to handle notification click
}}
onPrimaryActionClick={(notification) => {
// your logic to handle primary action click
}}
onSecondaryActionClick={(notification) => {
// your logic to handle secondary action click
}}
renderNotification={(notification) => (
<div>
<h3>{notification.subject}</h3>
<p>{notification.body}</p>
<p>{notification.data.text}</p>
</div>
)}
/>
</PopoverContent>
</Popover>
</Inbox>
);
}
Was this page helpful?
On this page