Skip to content
Overlays

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">

PropTypeDefaultDescription
notification*
NotificationItem
onSelect
(id: string) => voidFired with the notification id when the row is activated.

NotificationListProps

Extends Omit<HTMLAttributes<HTMLDivElement>, "onSelect">

PropTypeDefaultDescription
notifications*
readonly NotificationItem[]
onSelect
(id: string) => voidFired with the notification id when a row is activated.
emptyState
ReactNodeReplaces the built-in "You're all caught up" empty state.

NotificationCenterProps

Extends Omit<ComponentPropsWithoutRef<typeof PopoverContent>, "onSelect" | "title">

PropTypeDefaultDescription
notifications*
readonly NotificationItem[]Items to display in the inbox.
onMarkAllRead
() => voidFired when the "Mark all read" affordance is activated.
onNotificationClick
(id: string) => voidFired with the notification id when a row is activated.
title
ReactNode"Notifications"Header heading text.
emptyState
ReactNodeCustom empty-state content (defaults to "You're all caught up").
footer
ReactNodeOptional footer rendered below the list (e.g. a "View all" link).
className
stringClass names for the popover panel.