# Notification center

A notification bell and modal center for filtering, opening and marking persistent product updates.

Access: pro. Category: Navigation. Kind: composite.

## When to use

- Use it when a page needs a notification bell and modal center for filtering, opening and marking persistent product updates.
- Choose it as the nav region when composing a page from independently reusable TidalUI sections.

## Alternatives

- Choose notification-inbox instead when use the inbox for a full-page workflow with filtering, triage, and retained items.
- Choose notification-stack instead when use the stack for brief feedback immediately after an action.

## Setup for agents

Use React 19 and TypeScript. Initialize shadcn for your framework, then merge this exact entry into components.json:

```json
{
  "registries": {
    "@tidal-pro": {
      "url": "https://tidalui.com/r/pro/{name}.json",
      "headers": {
        "Authorization": "Bearer ${TIDALUI_TOKEN}"
      }
    }
  }
}
```

The namespace must be named **@tidal-pro** because transitive Pro dependencies use that namespace. Obtain an agent key from your active Pro account at https://tidalui.com/account. Keep TIDALUI_TOKEN in your local environment, never in components.json, client code, Git or logs.

```sh
export TIDALUI_TOKEN='your-private-agent-key'
npx shadcn@latest add @tidal-pro/waitlist-form
npx shadcn@latest add https://tidalui.com/r/tidal-button.json
```

Free command: `npx shadcn@latest add https://tidalui.com/r/<name>.json`.
Pro command: `npx shadcn@latest add @tidal-pro/<name>`.

Import the base stylesheet and every stylesheet listed on the installed item's metadata. For example:

```tsx
import "./components/ui/tidal.css";
import "./components/ui/hero-section.css";
// Place installed components inside this wrapper:
<div className="tidal-scope" data-theme="dark">...</div>
```

Omit data-theme for the default light theme. Put the attribute on the same tidal-scope element for dark mode. Every component installs the shared free tidal-base dependency. After upgrading, run `npx shadcn@latest add https://tidalui.com/r/tidal-base.json --overwrite` to receive current tokens. Review local modifications before overwriting.

Vite: Use React + TypeScript. Map @/* to ./src/* in paths and Vite resolve.alias. Import tidal.css and each component stylesheet in your application entry.

Next.js 15 App Router: Next.js App Router: import tidal.css and component CSS in app/layout.tsx. Interactive examples belong in a client component with "use client". Map @/* to ./* or ./src/* to match your project.

TypeScript 6: use paths without baseUrl:

```json
{
  "compilerOptions": {
    "paths": {
      "@/*": [
        "./src/*"
      ]
    }
  }
}
```

Pro registry requests are server/CLI-only. Use the same-origin account interface in a browser; cross-origin Authorization preflights are intentionally unsupported.


## Install Notification center

```sh
npx shadcn@latest add @tidal-pro/notification-center
```

Stylesheets: `components/ui/tidal.css`, `components/ui/notification-center.css`.

## Minimal example

```tsx
import"./components/ui/tidal.css";
import"./components/ui/notification-center.css";
import{TidalNotificationCenter}from"./components/ui/notification-center";
export default(p:Parameters<typeof TidalNotificationCenter>[0])=><div className="tidal-scope"><TidalNotificationCenter {...p}/></div>;
```

## Structured props

- `TidalNotificationCenterPage.filters: ReadonlyArray<TidalNotificationFilterOption>`: Required filters value accepted by this exported component.
- `TidalNotificationCenterPage.filterValue: string`: Required filter value value accepted by this exported component.
- `TidalNotificationCenterPage.notifications: ReadonlyArray<TidalNotificationRecord>`: Required notifications value accepted by this exported component.
- `TidalNotificationCenterPage.onFilterChange: (value: string, event: MouseEvent<HTMLButtonElement>) => void`: Callback invoked when the filter change interaction is proposed.
- `TidalNotificationCenterPage.onMarkAllRead: (notificationIds: readonly string[], event: MouseEvent<HTMLButtonElement>) => void`: Callback invoked when the mark all read interaction is proposed.
- `TidalNotificationCenterPage.onReadChange: (notification: TidalNotificationRecord, read: boolean, event: MouseEvent<HTMLButtonElement>) => void`: Callback invoked when the read change interaction is proposed.
- `TidalNotificationCenterPage.title: ReactNode`: Required title value accepted by this exported component.
- `TidalNotificationCenterPage.description?: ReactNode`: Optional description value accepted by this exported component.
- `TidalNotificationCenterPage.disabled?: boolean | undefined` (default false): Optional disabled value accepted by this exported component.
- `TidalNotificationCenterPage.emptyMessage?: ReactNode`: Optional empty message value accepted by this exported component.
- `TidalNotificationCenterPage.headingLevel?: "h2" | "h3" | "h4" | "h5" | "h6" | undefined` (default "h2"): Optional heading level value accepted by this exported component.
- `TidalNotificationCenterPage.labels?: Partial<TidalNotificationCenterLabels> | undefined`: Optional labels value accepted by this exported component.
- `TidalNotificationCenterPage.loading?: boolean | undefined` (default false): Optional loading value accepted by this exported component.
- `TidalNotificationCenterPage.markAllButtonProps?: NativeButtonProps | undefined` (default {}): Optional mark all button props value accepted by this exported component.
- `TidalNotificationCenterPage.markAllButtonRef?: Ref<HTMLButtonElement> | undefined`: Optional mark all button ref value accepted by this exported component.
- `TidalNotificationCenter.filters: ReadonlyArray<TidalNotificationFilterOption>`: Required filters value accepted by this exported component.
- `TidalNotificationCenter.filterValue: string`: Required filter value value accepted by this exported component.
- `TidalNotificationCenter.notifications: ReadonlyArray<TidalNotificationRecord>`: Required notifications value accepted by this exported component.
- `TidalNotificationCenter.onFilterChange: (value: string, event: MouseEvent<HTMLButtonElement>) => void`: Callback invoked when the filter change interaction is proposed.
- `TidalNotificationCenter.onMarkAllRead: (notificationIds: readonly string[], event: MouseEvent<HTMLButtonElement>) => void`: Callback invoked when the mark all read interaction is proposed.
- `TidalNotificationCenter.onOpenChange: (open: boolean) => void`: Callback invoked when the open change interaction is proposed.
- `TidalNotificationCenter.onReadChange: (notification: TidalNotificationRecord, read: boolean, event: MouseEvent<HTMLButtonElement>) => void`: Callback invoked when the read change interaction is proposed.
- `TidalNotificationCenter.open: boolean`: Required open value accepted by this exported component.
- `TidalNotificationCenter.title: ReactNode`: Required title value accepted by this exported component.
- `TidalNotificationCenter.description?: ReactNode`: Optional description value accepted by this exported component.
- `TidalNotificationCenter.disabled?: boolean | undefined` (default false): Optional disabled value accepted by this exported component.
- `TidalNotificationCenter.emptyMessage?: ReactNode`: Optional empty message value accepted by this exported component.
- `TidalNotificationCenter.headingLevel?: "h2" | "h3" | "h4" | "h5" | "h6" | undefined` (default "h2"): Optional heading level value accepted by this exported component.
- `TidalNotificationCenter.labels?: Partial<TidalNotificationCenterLabels> | undefined`: Optional labels value accepted by this exported component.
- `TidalNotificationCenter.loading?: boolean | undefined` (default false): Optional loading value accepted by this exported component.
- `TidalNotificationCenter.markAllButtonProps?: NativeButtonProps | undefined` (default {}): Optional mark all button props value accepted by this exported component.
- `TidalNotificationCenter.markAllButtonRef?: Ref<HTMLButtonElement> | undefined`: Optional mark all button ref value accepted by this exported component.
- `TidalNotificationCenter.sheetProps?: NotificationSheetProps | undefined` (default {}): Optional sheet props value accepted by this exported component.
- `TidalNotificationCenter.triggerLabel?: ReactNode` (default "Notifications"): Optional trigger label value accepted by this exported component.
- `TidalNotificationCenter.triggerProps?: NativeButtonProps | undefined` (default {}): Optional trigger props value accepted by this exported component.
- `TidalNotificationCenter.triggerRef?: Ref<HTMLButtonElement> | undefined`: Optional trigger ref value accepted by this exported component.
- `TidalNotificationCenter.viewRef?: Ref<HTMLElement> | undefined`: Optional view ref value accepted by this exported component.

## Complete usage example

[Source](https://tidalui.com/examples/notification-center.tsx) | [Manifest](https://tidalui.com/examples/notification-center.json). Install the listed additional dependencies. Consumer fixture: TypeScript pass; Vite pass. This fixture check is distinct from the actual shadcn install receipt.

```tsx
"use client";

import "./components/ui/tidal.css";

import { useId, useRef, useState } from "react";

import { CalendarDays, MessageCircle, ShieldCheck, Sparkles } from "lucide-react";

import { TidalNotificationCenter, type TidalNotificationFilterOption, type TidalNotificationRecord } from "./components/ui/notification-center";

import "./components/ui/notification-center.css";

import "./components/ui/sheet-drawer.css";



const tidalExampleStyles = ".notification-center-demo,\n.notification-center-demo * {\n  box-sizing: border-box;\n}\n\n.tidal-scope .notification-center-demo {\n  display: grid;\n  width: 100%;\n  max-width: 420px;\n  justify-items: center;\n  min-width: 0;\n  gap: 12px;\n}\n\n.notification-center-demo-detail {\n  display: grid;\n  min-width: 0;\n  gap: 4px;\n  padding: 14px 16px;\n  border: 1px solid var(--t-border);\n  border-radius: var(--t-radius-card);\n  outline: 0;\n  background: var(--t-subtle);\n  color: var(--t-ink);\n}\n\n.notification-center-demo-detail:focus-visible {\n  outline: 2px solid var(--t-accent);\n  outline-offset: 3px;\n}\n\n.notification-center-demo-detail > span {\n  color: var(--t-muted);\n  font-size: 11px;\n  font-weight: 720;\n  letter-spacing: 0.05em;\n  line-height: 1.3;\n  text-transform: uppercase;\n}\n\n.notification-center-demo-detail > strong {\n  font-size: 13px;\n  line-height: 1.4;\n  overflow-wrap: anywhere;\n}\n\n.notification-center-demo-detail > p,\n.notification-center-demo-note {\n  margin: 0;\n  color: var(--t-muted);\n  font-size: 11px;\n  line-height: 1.5;\n  overflow-wrap: anywhere;\n}\n\n@media (forced-colors: active) {\n  .notification-center-demo-detail {\n    border-color: CanvasText;\n  }\n}\n\n.notification-center-demo-detail {\n  width: 100%;\n}\n.notification-center-demo-detail[hidden] {\n  display: none;\n}\n.notification-center-demo-note {\n  text-align: center;\n}";

const FILTERS: readonly TidalNotificationFilterOption[] = [
  { id: "all", label: "All", mode: "all" },
  { id: "unread", label: "Unread", mode: "unread" },
  { id: "mentions", label: "Mentions", mode: "type", type: "mention" },
  { id: "system", label: "System", mode: "type", type: "system" },
];

const INITIAL_NOTIFICATIONS: readonly TidalNotificationRecord[] = [
  {
    id: "review-mention",
    accessibleLabel: "Mina mentioned you in Launch review",
    title: "Mina mentioned you in Launch review",
    description: "The final checklist is ready for your notes.",
    type: "mention",
    typeLabel: "Mention",
    read: false,
    timeLabel: "8 minutes ago",
    dateTime: "2026-10-14T18:42:00-05:00",
    leading: <MessageCircle />,
    destination: {
      href: "#notification-center-detail",
      label: "Open review detail",
    },
  },
  {
    id: "workspace-brief",
    accessibleLabel: "Workspace brief is ready",
    title: "Workspace brief is ready",
    description: "The local sample brief now includes the revised milestones.",
    type: "project",
    typeLabel: "Project",
    read: false,
    timeLabel: "35 minutes ago",
    dateTime: "2026-10-14T18:15:00-05:00",
    leading: <Sparkles />,
    destination: {
      href: "#notification-center-detail",
      label: "Review brief detail",
    },
  },
  {
    id: "calendar-window",
    accessibleLabel: "Review window moved to Thursday",
    title: "Review window moved to Thursday",
    description: "The supplied schedule now shows a 2:30 PM review window.",
    type: "schedule",
    typeLabel: "Schedule",
    read: true,
    timeLabel: "Yesterday",
    dateTime: "2026-10-13T15:10:00-05:00",
    leading: <CalendarDays />,
    destination: {
      href: "#notification-center-detail",
      label: "Open schedule detail",
    },
  },
  {
    id: "access-check",
    accessibleLabel: "Access review completed",
    title: "Access review completed",
    description:
      "The supplied workspace record reports no pending access changes.",
    type: "system",
    typeLabel: "System",
    read: false,
    timeLabel: "Monday",
    dateTime: "2026-10-12T11:20:00-05:00",
    leading: <ShieldCheck />,
    destination: {
      href: "#notification-center-detail",
      label: "View access detail",
    },
  },
];

export function NotificationCenterDemo({
  theme = "light",
}: {
  theme?: "light" | "dark";
}) {
  const [notifications, setNotifications] = useState<TidalNotificationRecord[]>(
    [...INITIAL_NOTIFICATIONS],
  );
  const [filter, setFilter] = useState("all");
  const [open, setOpen] = useState(false);
  const [selectedId, setSelectedId] = useState<string | null>(null);
  const detailId = `notification-center-detail-${useId().replace(/:/g, "")}`;
  const detailRef = useRef<HTMLElement>(null);
  const focusDetail = useRef(false);
  const selected = notifications.find(
    (notification) => notification.id === selectedId,
  );

  return (
    <section
      className="notification-center-demo"
      aria-label="Notification center sample"
    >
      <TidalNotificationCenter
        open={open}
        onOpenChange={setOpen}
        triggerLabel="Open notifications"
        title="Notifications"
        description="Persistent updates from this local workspace sample."
        notifications={notifications.map((notification) => ({
          ...notification,
          destination: notification.destination
            ? {
                ...notification.destination,
                href: `#${detailId}`,
                linkProps: {
                  onClick: (event: import("react").MouseEvent<HTMLAnchorElement>) => {
                    if (
                      event.button !== 0 ||
                      event.metaKey ||
                      event.ctrlKey ||
                      event.shiftKey ||
                      event.altKey
                    )
                      return;
                    event.preventDefault();
                    focusDetail.current = true;
                    setSelectedId(notification.id);
                    setOpen(false);
                  },
                },
              }
            : undefined,
        }))}
        filters={FILTERS}
        filterValue={filter}
        onFilterChange={setFilter}
        onReadChange={(notification, read) =>
          setNotifications((current) =>
            current.map((candidate) =>
              candidate.id === notification.id
                ? { ...candidate, read }
                : candidate,
            ),
          )
        }
        onMarkAllRead={(ids) => {
          const selectedIds = new Set(ids);
          setNotifications((current) =>
            current.map((notification) =>
              selectedIds.has(notification.id)
                ? { ...notification, read: true }
                : notification,
            ),
          );
        }}
        sheetProps={{
          theme,
          onCloseAutoFocus: (event) => {
            if (!focusDetail.current) return;
            event.preventDefault();
            focusDetail.current = false;
            detailRef.current?.focus({ preventScroll: true });
          },
        }}
      />

      <section
        className="notification-center-demo-detail"
        hidden={!selected}
        id={detailId}
        ref={detailRef}
        tabIndex={-1}
        aria-label="Selected notification detail"
      >
        {selected ? (
          <>
            <span>{selected.typeLabel}</span>
            <strong>{selected.title}</strong>
            <p>{selected.description}</p>
          </>
        ) : (
          <p>Open a notification to inspect its local sample detail.</p>
        )}
      </section>

      <p className="notification-center-demo-note">
        Local sample records. Changes are not stored or sent.
      </p>
    </section>
  );
}

export default function AgentExample() {
  return (
    <div className="tidal-scope" data-theme="light" dir="ltr">
      <style>{tidalExampleStyles}</style>
      <NotificationCenterDemo />
    </div>
  );
}

```

## Gotchas

- The host application owns data, validation, persistence, navigation, and service side effects described by this API.

## Theme and accessibility

{"tokens":["--t-accent","--t-border","--t-border-strong","--t-canvas","--t-danger","--t-display","--t-ease-out","--t-ease-spring","--t-faint","--t-font","--t-ink","--t-line","--t-muted","--t-primary","--t-primary-contrast","--t-radius-card","--t-radius-control","--t-radius-overlay","--t-radius-panel","--t-ring","--t-shadow-lg","--t-shadow-soft","--t-soft","--t-subtle","--t-surface","--t-wash"],"darkMode":true}

{"keyboard":["Tab and Shift+Tab follow the component's native focus order.","Arrow-key behavior follows the exported composite-control implementation.","Escape dismisses the open overlay where the underlying primitive supports dismissal."],"aria":"The component wires labels and relationships from consumer-provided visible text or ARIA props; preserve those labels in production.","notes":"Verify focus visibility, text alternatives, contrast, and reduced motion in the final composition."}

TidalNotificationCenter composes the accepted TidalSheet into a controlled notification-bell disclosure. Required open/onOpenChange, title, consumer-owned unique-ID notification records, controlled unique-ID filter definitions/value/change callback, read-change callback and mark-all callback. The trigger exposes an exact unread count plus native props/ref; the modal sheet provides bounded body scrolling, focus trapping, Escape/backdrop dismissal and trigger focus return. Records require accessibleLabel, title, read state, type/typeLabel, exact dateTime/timeLabel and may include description, leading media, disabled state, native article props/ref, native read-button props/ref and a native destination with href/label/attrs/ref. All/unread/type filters support counts and native buttons/refs. Caller handlers run first and prevention suppresses controlled proposals. aria-disabled true resolves to actual disabled behavior; explicit false remains enabled. Accepted synchronous read changes recover focus within the center if a filtered row disappears. Optional loading, empty, disabled, labels, heading level, mark-all attrs/ref, non-owned Sheet placement/theme/direction/dismissal props and inline TidalNotificationCenterPage are supported. Consumers own records, filtering decisions, routing, persistence and every side effect; the component performs no polling, request, storage or notification delivery.
