screens/DSNotificationCenter

DSNotificationCenter

screens
since v2.0

Full notification centre with grouping by type, mark-all-read, per-notification actions, and empty state.

iOS 17+macOS 14+

Purpose

In-app inbox for alerts, mentions, task updates, and system notifications.

Interactive Reference

Live showroom

Need the full visual surface?

Screenshots do not scale well across every component, state, and variant. For the real interactive reference, import the package and launch DSShowcaseRoot().

Best for exploring:

variants, states, categories, and real app examples in one place.

Props

PropTypeDefaultDescription
notificationsreq[DSNotification]Array of notification items.
onMarkAllReadreq(() -> Void)Mark all read callback.
onActionreq((DSNotification) -> Void)Per-notification tap handler.

Examples

Notifications sheet

Notification centre in a bottom sheet.

swift
DSBottomSheet(isPresented: $showNotifications, detents: [.large]) {
    DSNotificationCenter(
        notifications: viewModel.notifications,
        onMarkAllRead: { viewModel.markAllRead() },
        onAction: { notification in viewModel.handle(notification) }
    )
}

Related Components