Componentfeedback1.41 KB gzipZero dependencies
NotificationCenter
Bell button with unread badge + dropdown panel with notification rows, mark-all-read, empty state.
Preview
Live Preview
Installation
Tokens guide →Add to your project via CLI (zero dependencies, code you own):
npx bigbullui add notification-centerOr install the full npm package:
npm install bigbulluiUsage
tsx3 lines
import { NotificationCenter } from "@/components/ui/notification-center" <NotificationCenter notifications={[{ id: "1", title: "New message", body: "Hello", time: "2m ago", unread: true }]} />Source code
notification-center.tsx + 1 helperZero third-party dependencies (2 local files shown in tabs below).
tsxnotification-center.tsx171 lines
"use client"; import * as React from "react";import { cn } from "./lib/utils"; export type Notification = { id: string; title: string; body?: string; time?: string; unread?: boolean;}; export type NotificationCenterProps = { notifications?: Notification[]; onMarkAllRead?: () => void;} & React.HTMLAttributes<HTMLElement>; Props
| Prop | Type | Description |
|---|---|---|
| notifications | Notification[] | Array of notification objects. |
| onMarkAllRead | () => void | Callback invoked on mark all read. |