React SDK
Enbbox React SDK (@enbbox/react) — drop-in Inbox component, notification hooks, and real-time updates for React applications.
The @enbbox/react SDK provides React components for embedding notifications in your application.
Installation
npm install @enbbox/reactComponents
<Inbox />
The main notification inbox component with bell icon, notification list, and preferences.
import { Inbox } from "@enbbox/react";
<Inbox projectId="YOUR_PROJECT_ID" subscriberId="user-123" />;Hooks
useNotifications
Access notification data and actions:
import { useNotifications } from "@enbbox/react";
function NotificationList() {
const { notifications, isLoading, hasMore, fetchMore, readAll } =
useNotifications({ read: false });
if (isLoading) return <p>Loading...</p>;
return (
<div>
<button onClick={readAll}>Mark all read</button>
{notifications?.map((n) => (
<div key={n.id}>{n.body}</div>
))}
{hasMore && <button onClick={fetchMore}>Load more</button>}
</div>
);
}useCounts
Get notification counts for one or more filters:
import { useCounts } from "@enbbox/react";
function Badge() {
const { counts } = useCounts({ filters: [{ read: false }] });
const unread = counts?.[0]?.count ?? 0;
return unread > 0 ? <span>{unread}</span> : null;
}SDKs
Enbbox SDKs overview — client and server libraries for JavaScript, React, Next.js, Flutter, and server-side Node.js. Install, configure, and start sending notifications in minutes.
Next.js SDK
Enbbox Next.js SDK (@enbbox/nextjs) — server-side notification management for Next.js apps. Workflow serving, API routes, and server component support.