NotificationCenterContent
The panel.
import { NotificationCenterContent } from '@/components/ui/goop/notification-center';Options
- Also takes: container?: HTMLElement | null; frameClassName?: string
npx shadcn@4.23.1 add https://registry.goop.so/g/<link>/trail-notification-center.json --yesThe bell at the end of the top bar, and its panel of notifications, for React and Tailwind CSS. Part of Goop Pro.
label: "Today", "Earlier") in a NotificationCenterListimport {
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>
);
}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.
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.
npx shadcn@4.23.1 add https://registry.goop.so/g/<link>/trail-notification-center.json --yesAdd the Goop Notification center to this project. The install steps are at https://goop.so/docs/install.mdimport {
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>
);
}| Part | What it is |
|---|---|
| NotificationCenterTrigger | The bell; its props: notification-center--trigger.md |
| NotificationCenterContent | The panel; its props: notification-center--content.md |
| NotificationCenterHeader | The header; its props: notification-center--header.md |
| NotificationCenterList | The rows; its props: notification-center--list.md |
| NotificationCenterGroup | Rows under a day's heading (label: "Today", "Earlier") in a NotificationCenterList; hidden with no row shown; its props: notification-center--group.md |
| NotificationCenterItem | A row; its props: notification-center--item.md |
| NotificationCenterEmpty | The empty state; its props: notification-center--empty.md |
| NotificationCenterFooter | The footer; its props: notification-center--footer.md |
The panel.
import { NotificationCenterContent } from '@/components/ui/goop/notification-center';The empty state.
import { NotificationCenterEmpty } from '@/components/ui/goop/notification-center';null shows none.Rows under a day's heading (label: "Today", "Earlier") in a NotificationCenterList; hidden with no row shown.
import { NotificationCenterGroup } from '@/components/ui/goop/notification-center';NotificationCenterItems.The header.
import { NotificationCenterHeader } from '@/components/ui/goop/notification-center';A row.
import { NotificationCenterItem } from '@/components/ui/goop/notification-center';false) or unread (true) by its quick action.size="md"), or a glyph.strong); two lines at most.href is followed): mark it read here.DropdownMenuItems behind a dots button at the row's end.The rows.
import { NotificationCenterList } from '@/components/ui/goop/notification-center';<NotificationCenterEmpty />.import { NotificationCenter } from '@/components/ui/goop/notification-center';all or unread.The bell.
import { NotificationCenterTrigger } from '@/components/ui/goop/notification-center';| Key | What it does |
|---|---|
| Enter Space | On the bell: open the panel, the focus on its first control |
| Tab | Mark all as read, the views, each row, its quick actions (read or unread, archive, dismiss) and its options button, then the footer link |
| ArrowLeft ArrowRight | On the views: move between All and Unread |
| Escape | Close the open options menu, else the panel, the focus back on what opened it |
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.
npx shadcn@4.23.1 add https://registry.goop.so/g/<link>/trail-notification-center.json --yesGoop makes design skills and React components for AI coding agents, so every screen your agent builds matches.