# Notification Center

> An inbox behind a bell with an unread count: All, Mentions and Unread tabs, rows grouped by day with avatars or app tiles, rich text, unread dots, comment previews and Accept / Decline for invites. Mark all as read, per-row read and archive on hover or focus, an empty state per tab, arrow-key navigation and a fixed-height list that never jumps.

- Slug: `notification-center`
- Category: [Notifications](https://www.assembli.design/category/notifications.md)
- Type: component
- Tags: notifications, inbox, bell, popover, tabs, unread, base-ui
- npm dependencies: @base-ui/react, lucide-react, motion
- shadcn/ui dependencies: none
- Live preview: https://www.assembli.design/preview/notification-center
- Page: https://www.assembli.design/components/notification-center

![Notification Center preview](https://www.assembli.design/thumbnails/notification-center-light.png)

## Props

Other props pass through to the root element.

| Prop | Type | Default | Description |
| --- | --- | --- | --- |
| `defaultItems` | `NotificationItem[]` | `SAMPLE_NOTIFICATIONS` | Starting notifications. The center keeps its own state from there and reports changes. |
| `onItemsChange` | `(items: NotificationItem[]) => void` |  |  |
| `onInvite` | `(item: NotificationItem, answer: "accepted" \| "declined") => void` |  | Called when someone answers an invite. |
| `open` | `boolean` |  |  |
| `defaultOpen` | `boolean` |  |  |
| `onOpenChange` | `(open: boolean) => void` |  |  |
| `side` | `"top" \| "bottom" \| "left" \| "right"` | `"bottom"` |  |
| `align` | `"start" \| "center" \| "end"` | `"end"` |  |
| `listHeight` | `number` | `420` | Height of the scrolling list, in px. It stays fixed so the panel never jumps as rows come and go. |
| `footer` | `React.ReactNode` | `"View all notifications"` | A footer link; leave it out to hide the footer. |

## Install

One-time setup (needs a subscription):

1. Add the registry to the project's `components.json`: `{"@assembli":{"url":"https://www.assembli.design/r/{name}.json","headers":{"Authorization":"Bearer ${ASSEMBLI_API_KEY}"}}}` (merge into `"registries"`).
2. Put an API key from https://www.assembli.design/account in `.env.local` as `ASSEMBLI_API_KEY=asm_…`.

Then install with the shadcn CLI (writes `components/notification-center/notification-center.tsx` and installs dependencies):

```bash
npx shadcn@latest add @assembli/notification-center
```

Registry item JSON: https://www.assembli.design/r/notification-center.json (send `Authorization: Bearer <api key>`)

## Code

> Component source needs an Assembli subscription ($12/month or $96/year) and an API key sent as `Authorization: Bearer <key>`. To get one without copying anything, POST https://www.assembli.design/api/agent/login (or call the MCP tool connect_account), show the user the link it returns, and poll https://www.assembli.design/api/agent/token for the key. Or subscribe at https://www.assembli.design/pricing and create a key at https://www.assembli.design/account.
