docs/platform/inbox/setup-inbox.mdx
The Inbox component displays a notification bell by default, which opens a menu containing the subscriber's notifications and preferences.
To get started, install the Inbox UI:
<Tabs> <Tab title="Next.js"> ```package-install npm install @novu/nextjs ``` </Tab> <Tab title="React"> ```package-install npm install @novu/react ``` </Tab> </Tabs> <Note> **`@novu/react` requires React 18 or later.** The package supports React `^18.0.0` and React 19 (`^19.0.0`). React 17 and below are not supported. When rendering the Inbox UI, you also need `react-dom` at the same version. </Note> <Tabs> <Tab title="Next.js"> <Prompt description="Add Novu Inbox to my Next.js app" icon="sparkles" actions={["copy", "cursor"]}> # Add Novu Inbox to Next.js AppInstall @novu/nextjs. Add the <Inbox /> component to your header, navbar, or sidebar.
Latest docs: https://docs.novu.co/platform/quickstart/nextjs
npm install @novu/nextjs
'use client';
import { Inbox } from '@novu/nextjs';
export default function NotificationInbox() {
return (
<Inbox
applicationIdentifier="YOUR_APPLICATION_IDENTIFIER"
subscriberId="YOUR_SUBSCRIBER_ID"
/>
);
}
Use the app's existing auth system to get a unique user identifier for subscriberId. Check for Clerk, NextAuth, Firebase, Supabase, or custom auth. If no auth system exists, use YOUR_SUBSCRIBER_ID.
Extract design tokens from the host app (Tailwind config, CSS variables, theme objects) and apply them via the appearance prop. Only include values you extracted from the host design system — omit empty or placeholder appearance values.
ALWAYS:
<Inbox /> inline in existing UI — no new pages or wrappersNEVER:
@novu/nextjs installed with the project's package manager?<Inbox /> placed inline in existing UI?If any fails, revise. </Prompt> </Tab> <Tab title="React"> <Prompt description="Add Novu Inbox to my React app" icon="sparkles" actions={["copy", "cursor"]}>
Install @novu/react. Add the <Inbox /> component to your header, navbar, or sidebar.
Latest docs: https://docs.novu.co/platform/quickstart/react
npm install @novu/react
import { Inbox } from '@novu/react';
import { useNavigate } from 'react-router-dom';
export default function NotificationInbox() {
const navigate = useNavigate();
return (
<Inbox
applicationIdentifier="YOUR_APPLICATION_IDENTIFIER"
subscriberId="YOUR_SUBSCRIBER_ID"
routerPush={(path) => navigate(path)}
/>
);
}
Use the app's existing auth system to get a unique user identifier for subscriberId. Check for Clerk, NextAuth, Firebase, Supabase, or custom auth. If no auth system exists, use YOUR_SUBSCRIBER_ID.
Extract design tokens from the host app (Tailwind config, CSS variables, theme objects) and apply them via the appearance prop. Only include values you extracted from the host design system — omit empty or placeholder appearance values.
ALWAYS:
<Inbox /> inline in existing UI — no new pages or wrappersNEVER:
@novu/react installed with the project's package manager?<Inbox /> placed inline in existing UI?If any fails, revise. </Prompt> </Tab> </Tabs>
Keyless mode lets you test the look and features of the Inbox component instantly in your application, no setup required.
<Tabs> <Tab title="Next.js"> ```tsxexport function Novu() {
return (
<Inbox />
);
}
```
export function Novu() {
return (
<Inbox />
);
}
```
To display real-time notifications for your subscribers, connect the Inbox component to your Novu environment using your applicationIdentifier and a subscriberId. You can create or manage subscribers from the Novu Dashboard.
export function Novu() {
return (
<Inbox
applicationIdentifier="APPLICATION_IDENTIFIER"
subscriber="SUBSCRIBER_ID"
/>
);
}
```
export function Novu() {
return (
<Inbox
applicationIdentifier="APPLICATION_IDENTIFIER"
subscriber="SUBSCRIBER_ID"
/>
);
}
```
If your Novu account is in the EU region, then include the backendUrl and socketUrl props to connect to EU-specific API endpoints:
export function Novu() {
return (
<Inbox
applicationIdentifier="APPLICATION_IDENTIFIER"
subscriber="SUBSCRIBER_ID"
backendUrl="https://eu.api.novu.co"
socketUrl="wss://eu.socket.novu.co"
/>
);
}
```
export function Novu() {
return (
<Inbox
applicationIdentifier="APPLICATION_IDENTIFIER"
subscriber="SUBSCRIBER_ID"
backendUrl="https://eu.api.novu.co"
socketUrl="wss://eu.socket.novu.co"
/>
);
}
```
Pass a subscriber object instead of a subscriber ID string to set profile fields such as firstName, email, locale, and data on session init. New subscribers are created automatically; updating an existing profile requires HMAC encryption and subscriberHash.