screens/DSNotificationCenter

DSNotificationCenter

screens
since 0.1.0

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

iOS 17+macOS 14+watchOS 10+tvOS 17+visionOS 1+

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
notificationsreqBinding<[DSNotification]>—Notifications. A binding so the view can mark them read and remove them.
isPresentedreqBinding<Bool>—Controls visibility of the panel.

Examples

Notifications panel

Panel driven by your notification store.

swift
@State private var notifications: [DSNotification] = [
    DSNotification(type: .mention, title: "Ana mentioned you", message: "Can you review the new tokens?", senderInitials: "AL"),
    DSNotification(type: .success, title: "Deploy finished", message: "v0.1.0 is live.", isRead: true),
]
@State private var showNotifications = false

var body: some View {
    ContentView()
        .overlay {
            if showNotifications {
                DSNotificationCenter(notifications: $notifications, isPresented: $showNotifications)
            }
        }
}

Related Components