Componentfeedback1.41 KB gzipZero dependencies

NotificationCenter

Bell button with unread badge + dropdown panel with notification rows, mark-all-read, empty state.

Preview

Live Preview
Open ↗

Installation

Tokens guide →

Add to your project via CLI (zero dependencies, code you own):

npx bigbullui add notification-center

Or install the full npm package:

npm install bigbullui

Usage

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 helper

Zero 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

PropTypeDescription
notificationsNotification[]Array of notification objects.
onMarkAllRead() => voidCallback invoked on mark all read.