NotificationCenter

Description

A bell button that opens a panel of recent notifications

NotificationCenter provides a bell icon with an unread count badge. Clicking it opens a side panel listing recent notifications grouped by date (Today, Yesterday, Earlier), with read/unread state, tone-coded dots, and a mark-all-read action.

Notifications are loaded asynchronously via the LoadItems callback, so the panel always shows the most recent state.

API reference

class

NotificationCenter

public sealed class NotificationCenter : IComponent

A notification bell button that opens a panel listing recent notifications with read/unread state.

Namespace
Tesserae
Implements
IComponent

Constructors

NameDescription
NotificationCenterInitializes a new instance of this class.
Constructor
NotificationCenter
public NotificationCenter()

Initializes a new instance of this class.

Methods

NameDescription
LoadItemsSets the async function that loads notification items.
OnMarkReadRegisters a callback for when a single notification is marked read.
OnClearAllRegisters a callback for when all notifications are cleared.
BadgeCountBinds an observable integer to drive the badge count.
SetBadgeCountSets the badge count directly.
RenderRenders the component's root HTML element.
Method
NotificationCenter.LoadItems
public NotificationCenter LoadItems(Func<Task<NotificationItem[]>> loader)

Sets the async function that loads notification items.

Method
NotificationCenter.OnMarkRead
public NotificationCenter OnMarkRead(Action<string> onMarkRead)

Registers a callback for when a single notification is marked read.

Method
NotificationCenter.OnClearAll
public NotificationCenter OnClearAll(Action onClearAll)

Registers a callback for when all notifications are cleared.

Method
NotificationCenter.BadgeCount
public NotificationCenter BadgeCount(IObservable<int> count)

Binds an observable integer to drive the badge count.

Method
NotificationCenter.SetBadgeCount
public NotificationCenter SetBadgeCount(int count)

Sets the badge count directly.

Method
NotificationCenter.Render
public HTMLElement Render()

Renders the component's root HTML element.

Samples

Live Demo

Badge Control

See also

© 2026 Curiosity. All rights reserved.