Skip to main content

The Inbox component displays a notification bell by default, which opens a menu containing the subscriber’s notifications and preferences.

Installation#

To get started, install the Inbox UI:

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.

Add Novu Inbox to my Next.js appOpen in Cursor

Add Novu Inbox to Next.js App#

Install @novu/nextjs. Add the <Inbox /> component to your header, navbar, or sidebar.

Latest docs: https://docs.novu.co/platform/quickstart/nextjs

Install#

Component#

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.

Appearance#

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.

Rules#

ALWAYS:

  • Detect the project’s package manager and use it for installation
  • Extract design tokens and apply via the appearance prop
  • Place <Inbox /> inline in existing UI - no new pages or wrappers
  • Use TypeScript, no comments, no empty props
  • Follow Next.js conventions
  • Use the existing auth system to source subscriberId when available

NEVER:

  • Add empty appearance values or placeholder props
  • Create wrapper components or new pages just for the inbox
  • Add code comments
  • Introduce styles not in the host app
  • Add unused props or imports

Verify Before Responding#

  1. Is @novu/nextjs installed with the project’s package manager?
  2. Is <Inbox /> placed inline in existing UI?
  3. Are design tokens extracted and applied?
  4. Are all props non-empty and properly typed?
  5. Is subscriberId sourced from the auth system when available?

If any fails, revise.

Try Inbox in keyless mode#

Keyless mode lets you test the look and features of the Inbox component instantly in your application, no setup required.

Inbox keyless

Note

This is only for testing, the data is temporary (expires in 24h) and not tied to real subscribers.

Use Inbox with real subscribers#

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.

US region (default)#

Sign in to get your own API keys

EU region#

If your Novu account is in the EU region, then include the backendUrl and socketUrl props to connect to EU-specific API endpoints:

Sign in to get your own API keys

Pass subscriber profile fields#

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.