Skip to content
nexubDesign System
v11.9.0

Patterns · Feedback

NotificationCenter

Since v6.6.0

A bell with an unread count that opens the notification list.

import { NotificationCenter } from '@nexub/patterns';
View as Markdown

Examples

Inbox

Props

Props
PropTypeDefaultDescription
notificationsrequiredNotificationCenterItem[]—Newest first. Your app owns them and their read state.
onOpen((id: string) => void)—A notification was opened; mark it read here.
onDismiss((id: string) => void)—Shows a dismiss button per item.
onMarkAllRead(() => void)—Shows "Mark all as read" while some are unread.
emptyTextReact.ReactNode—Shown with no notifications.
classNamestring—
emptyStateReact.ReactNode—Shown when there are no notifications, in place of emptyText.
errorStateReact.ReactNode—Shown in place of the list; wins over loading and emptyState.
loadingboolean—10.5: shows skeleton rows in place of the list and sets aria-busy on the panel.
sheetfalse | true | 'auto''auto' (pass `sheet={false}` to keep a popover on small screens)10.6: on phones the panel opens as a bottom sheet (true, or 'auto' to let the component decide).

On iOS & Android