Add a Notification Bell to Your React App
Stop building notification UI from scratch. Drop in a real-time bell widget with one script tag and a useEffect hook. Shadow DOM isolation means zero CSS conflicts.
New feature available
Try our new dashboard analytics.
Team invite accepted
Sarah joined your workspace.
Export complete
Your CSV is ready to download.
Two-Step Integration
Live in under 10 minutes
No npm packages. No build step changes. Just a script tag and one hook.
Add the script tag
<!-- Add to your index.html or _document.tsx -->
<script
src="https://api.notilayer.com/widget/widget.js"
defer
></script> Initialize in useEffect
import { useEffect } from 'react';
function App() {
useEffect(() => {
window.Notilayer?.init({
projectId: 'your-project-id',
userId: currentUser.id,
});
}, [currentUser.id]);
return <div>...</div>;
} That is it. The bell icon and notification inbox render automatically. Read our step-by-step React guide for a full walkthrough.
Shadow DOM Isolation
Zero CSS conflicts, guaranteed
The widget renders inside a Shadow DOM. Your styles stay yours. The widget styles stay contained.
Style Encapsulation
Tailwind, Bootstrap, or custom CSS will never break the notification bell. Fully isolated shadow root.
Under 15KB
Gzipped and loaded async with defer. Never blocks your page render or JavaScript execution.
Customizable
Adjust colors, position, and bell style from the dashboard. Match your brand without writing CSS.
Real-Time SSE
Notifications arrive instantly via Server-Sent Events. Lighter than WebSockets, no polling needed.
Next.js Compatible
Works with Next.js out of the box
Use the next/script component for optimized loading. Works with both Pages Router and App Router. No special configuration needed.
- SSR and SSG compatible — widget loads client-side only
- No hydration mismatches — Shadow DOM stays outside React tree
- Works with Vercel, Netlify, or self-hosted deployments
// pages/_app.tsx or app/layout.tsx
import Script from 'next/script';
export default function Layout({ children }) {
return (
<>
<Script
src="https://api.notilayer.com/widget/widget.js"
strategy="afterInteractive"
/>
{children}
</>
);
} Framework Agnostic
Works with every React-based framework
One script tag works everywhere JavaScript runs. No framework-specific packages to install.
React
CRA, Vite
Next.js
App + Pages Router
Remix
v2+
Gatsby
v4+
FAQ
Common questions about the React notification bell
How do I add a notification bell to my React app without building it from scratch?
Does the notification bell work with Next.js and other React frameworks?
Will the notification widget conflict with my existing styles?
How long does it take to add in-app notifications to a React app?
Explore more: Home · Next.js Notifications · React Notifications Guide
Add a Notification Bell in 10 Minutes
One script tag. Works with React, Next.js, Remix, and more. Start free.