screens/DSNotificationCenter
DSNotificationCenter
screensFull 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.
Props
| Prop | Type | Default | Description |
|---|---|---|---|
| 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) }
)
}