Notification Center
Bell-trigger inbox with unread badge and a scrollable list.
Import
tsx
import { NotificationCenter, NotificationList, NotificationRow } from "@cooud-ui/ui";
bash
npx cooud-ui add notification-center
Examples
API Reference
Generated from the component's exported types.
NotificationRowProps
Extends Omit<HTMLAttributes<HTMLButtonElement>, "id" | "title" | "onClick" | "onSelect">
| Prop | Type | Default | Description |
|---|---|---|---|
notification* | NotificationItem | — | — |
onSelect | (id: string) => void | — | Fired with the notification id when the row is activated. |
NotificationListProps
Extends Omit<HTMLAttributes<HTMLDivElement>, "onSelect">
| Prop | Type | Default | Description |
|---|---|---|---|
notifications* | readonly NotificationItem[] | — | — |
onSelect | (id: string) => void | — | Fired with the notification id when a row is activated. |
emptyState | ReactNode | — | Replaces the built-in "You're all caught up" empty state. |
NotificationCenterProps
Extends Omit<ComponentPropsWithoutRef<typeof PopoverContent>, "onSelect" | "title">
| Prop | Type | Default | Description |
|---|---|---|---|
notifications* | readonly NotificationItem[] | — | Items to display in the inbox. |
onMarkAllRead | () => void | — | Fired when the "Mark all read" affordance is activated. |
onNotificationClick | (id: string) => void | — | Fired with the notification id when a row is activated. |
title | ReactNode | "Notifications" | Header heading text. |
emptyState | ReactNode | — | Custom empty-state content (defaults to "You're all caught up"). |
footer | ReactNode | — | Optional footer rendered below the list (e.g. a "View all" link). |
className | string | — | Class names for the popover panel. |