Theme
Install with your agentnpx shadcn@4.23.1 add https://registry.goop.so/g/<link>/trail-notification-center.json --yes

Notification center

Pro

The bell at the end of the top bar, and its panel of notifications, for React and Tailwind CSS. Part of Goop Pro.

Open the bell: point at a row (or Tab to it) to mark it read or unread, archive or dismiss it, or use its options; accept or decline the invitation; Mark all as read clears the count; switch to Unread. The line under it says the view shown and a row whose options are open. Pick a look: four bells and their counts, a long row, a list that scrolls, the bell in a top bar. The people and notifications are our own sample: nothing is sent or stored.

When to use

  • The bell at the end of the top bar, and its panel of notifications.
  • Also called: notifications panel or inbox.

Installation

Paste the prompt below into your coding agent. It reads Goop's install steps, installs the part and its tokens once, then reuses this same Notification center on every screen instead of drawing a new one: the same height, the same focus ring, the same spacing. As a Pro part, its command comes from Goop's server once you sign in, with a one-time link that lasts ten minutes.

Terminal
npx shadcn@4.23.1 add https://registry.goop.so/g/<link>/trail-notification-center.json --yes
PROMPT
Add the Goop Notification center to this project. The install steps are at https://goop.so/docs/install.md

Usage

TSX
import {
  NotificationCenter, NotificationCenterTrigger, NotificationCenterContent, NotificationCenterHeader, NotificationCenterList, NotificationCenterGroup, NotificationCenterItem, NotificationCenterEmpty,
  NotificationCenterFooter,
} from '@/components/ui/goop/notification-center';
import { useState } from 'react';
import { TopBar, TopBarRow, TopBarGroup } from '@/components/ui/goop/top-bar';

function Inbox() {
  const [notes, setNotes] = useState([{ id: 'n1', who: 'Bilal Rashed', did: 'commented on Transcript search', unread: true }]);
  const mark = (id: string, unread: boolean) =>
    setNotes((all) => all.map((note) => (note.id === id ? { ...note, unread } : note)));
  return (
    <TopBar>
      <TopBarRow>
        <TopBarGroup align="end">
          <NotificationCenter unread={notes.filter((note) => note.unread).length}>
            <NotificationCenterTrigger />
            <NotificationCenterContent>
              <NotificationCenterHeader onMarkAllRead={() => setNotes((all) => all.map((n) => ({ ...n, unread: false })))} />
              <NotificationCenterList>
                {notes.map((note) => (
                  <NotificationCenterItem
                    key={note.id}
                    unread={note.unread}
                    time="2h"
                    href={`/notifications/${note.id}`}
                    onSelect={() => mark(note.id, false)}
                    onUnreadChange={(unread) => mark(note.id, unread)}
                    onArchive={() => setNotes((all) => all.filter((n) => n.id !== note.id))}
                  >
                    <strong>{note.who}</strong> {note.did}
                  </NotificationCenterItem>
                ))}
              </NotificationCenterList>
              <NotificationCenterFooter href="/notifications" />
            </NotificationCenterContent>
          </NotificationCenter>
        </TopBarGroup>
      </TopBarRow>
    </TopBar>
  );
}
  • Fits: frame: top-bar.
  • Also known as: NotificationBell, InboxPopover, NotificationsPanel, NotificationDropdown.
  • Put a NotificationCenter at the end of the top bar with the unread count from your data; fill it with NotificationCenterItems, mark rows read in your own state, and link the footer to the full notifications page.
  • height, width, padding, gap, corner, border, background, text, motion: add no class for these.

API reference

Parts
PartWhat it is
NotificationCenterTriggerThe bell; its props: notification-center--trigger.md
NotificationCenterContentThe panel; its props: notification-center--content.md
NotificationCenterHeaderThe header; its props: notification-center--header.md
NotificationCenterListThe rows; its props: notification-center--list.md
NotificationCenterGroupRows under a day's heading (label: "Today", "Earlier") in a NotificationCenterList; hidden with no row shown; its props: notification-center--group.md
NotificationCenterItemA row; its props: notification-center--item.md
NotificationCenterEmptyThe empty state; its props: notification-center--empty.md
NotificationCenterFooterThe footer; its props: notification-center--footer.md

NotificationCenterContent

The panel.

TSX
import { NotificationCenterContent } from '@/components/ui/goop/notification-center';

Options

  • Also takes: container?: HTMLElement | null; frameClassName?: string

NotificationCenterEmpty

The empty state.

TSX
import { NotificationCenterEmpty } from '@/components/ui/goop/notification-center';

Options

  • title?: ReactNode = 'You’re all caught up' — The title.
  • description?: ReactNode = 'New notifications will show here.' — The line under it; null shows none.

NotificationCenterGroup

Rows under a day's heading (label: "Today", "Earlier") in a NotificationCenterList; hidden with no row shown.

TSX
import { NotificationCenterGroup } from '@/components/ui/goop/notification-center';

Options

  • label: ReactNode — The heading's words ("Today", "Earlier").
  • children?: ReactNode — The group's NotificationCenterItems.

NotificationCenterItem

A row.

TSX
import { NotificationCenterItem } from '@/components/ui/goop/notification-center';

Options

  • unread?: boolean = false — Unread: the accent dot, and "Unread" said first.
  • onUnreadChange?: (unread: boolean) => void — Marked read (false) or unread (true) by its quick action.
  • onArchive?: () => void — Archived by its quick action; the focus moves to the next row.
  • onDismiss?: () => void — Dismissed by its quick action; the focus moves to the next row.
  • inlineActions?: ReactNode — Your small Buttons under the sentence (Accept, Decline).
  • media?: ReactNode — The picture at the row's start: a 24 px Avatar (size="md"), or a glyph.
  • children: ReactNode — The notification, one sentence (the person's name in a strong); two lines at most.
  • time: ReactNode — When it happened ("2h", "Yesterday"), at the row's end.
  • href?: string — Where the row goes: the whole row is this link.
  • onSelect?: () => void — Called when the row is pressed (before an href is followed): mark it read here.
  • actions?: ReactNode — The row's options: DropdownMenuItems behind a dots button at the row's end.
  • actionsLabel?: string = 'Options' — The options button's name, read with the sentence.
  • actionsOpen?: boolean — The options menu open, controlled.
  • defaultActionsOpen?: boolean — The options menu open at first, uncontrolled (closed by default).
  • onActionsOpenChange?: (open: boolean) => void — Called when the options menu opens or closes.
  • unreadLabel?: string = 'Unread' — What the dot says to a screen reader.
  • markReadLabel?: string = 'Mark as read' — Default "Mark as read".
  • markUnreadLabel?: string = 'Mark as unread' — Default "Mark as unread".
  • archiveLabel?: string = 'Archive' — Default "Archive".
  • dismissLabel?: string = 'Dismiss' — Default "Dismiss".

NotificationCenterList

The rows.

TSX
import { NotificationCenterList } from '@/components/ui/goop/notification-center';

Options

  • empty?: ReactNode — What shows while no row is in the current view; default <NotificationCenterEmpty />.

NotificationCenter: every option

TSX
import { NotificationCenter } from '@/components/ui/goop/notification-center';

Options

  • unread: number — How many are unread: the count on the bell and in its name.
  • label?: string = 'Notifications' — The panel's name and heading.
  • view?: 'all' | 'unread' — Which rows show, controlled: all or unread.
  • defaultView?: 'all' | 'unread' = 'all' — Which rows show at first, uncontrolled.
  • onViewChange?: (view: 'all' | 'unread') => void — Called with the view a person picks.
  • Also takes: open?: boolean; defaultOpen?: boolean = false; onOpenChange?: (open: boolean) => void; modal?: boolean
  • Takes every prop of Popover (its page: popover.md)
  • State: view (view / defaultView / onViewChange); open (open / defaultOpen / onOpenChange)

NotificationCenterTrigger

The bell.

TSX
import { NotificationCenterTrigger } from '@/components/ui/goop/notification-center';

Options

  • aria-label?: string — The button's name; left out, the panel's label and the unread count.
  • Also takes: type?: 'button' | 'submit' | 'reset'; onClick?: (event: MouseEvent) => void; disabled?: boolean

Keyboard

KeyWhat it does
Enter SpaceOn the bell: open the panel, the focus on its first control
TabMark all as read, the views, each row, its quick actions (read or unread, archive, dismiss) and its options button, then the footer link
ArrowLeft ArrowRightOn the views: move between All and Unread
EscapeClose the open options menu, else the panel, the focus back on what opened it

Accessibility

  • The part itself answers the keys above.
  • hover, active, focus-visible, focus-within: the browser's own (:hover, :active, :focus-visible, :focus-within): write nothing

Motion

  • The part sets its own motion: add no transition or animation of your own.
  • How the theme moves, and how to move your own parts the same way: Motion.

Notes for AI

Give your coding agent this page as text instead of screenshots: the parts, the options, the states and the keys. An agent that reads the real part builds the real part, not a lookalike.

goop.so/themes/trail/components/notification-center.md · the page as Markdown
Theme
Install with your agentnpx shadcn@4.23.1 add https://registry.goop.so/g/<link>/trail-notification-center.json --yes

Where would you like to start?

Free · now

The Goop plugin

A design system for your AI coding agent, so screen ten matches screen one.

/plugin marketplace add goop-so/skillsthen /plugin install goop@goopCodex, Cursor, ChatGPT, the Claude app and more: Connect Goop
FreePro

The components

Every part live, with its props, its keys and what an agent sees. Whole page and app templates, working with sample data.