Tesserae

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.

Constructors

Constructor
NotificationCenter
public NotificationCenter()

Initializes a new instance of this class.

Methods

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 Tesserae. All rights reserved.