Skip to content
Razor catalogue

On this page

@addTagHelper *, Webority.Ui.Razor

Grouped by day, with read state

Choosing an item marks it read, and Mark all read clears the rest so the count and the bell follow.

Read state in your hands
Items grouped by day, with a live count.
Show code
<app-notification-center read-action="/Notifications?handler=ReadAll" view-all-href="/Notifications">
    <app-notification id="n1" title="Invoice INV-2041 approved" text="By Meera Iyer"
        href="/Invoices/2041" at="2026-10-11T14:05:00+05:30" icon="receipt" />
</app-notification-center>

Tabs

Tabs split the list into All, Unread and Archived, so a person can see only the items they are working on.

All, Unread and Archived
The three tabs over one list.
Show code
<app-notification-center tabs="true" open="true">
    <app-notification id="n5" title="Old leave request approved" href="/Leave/41"
        at="2026-09-20T10:00:00+05:30" read="true" archived="true" />
</app-notification-center>

Nothing new

With no items the panel says so, and when every item is read the badge goes and Mark all read is disabled.

Empty
The panel with no items and its empty text.
Show code
<app-notification-center open="true"></app-notification-center>

Every option

Every value of every prop, one cell each.

items: the list, newest first

id and title: the row's identity

id: not drawn, names the row to your script
title: the one line that says what happened

text: the second line

text: (default), no second line
text="By Meera Iyer": a quieter second line

href: the record it opens

href: (default), no link, the row is a button
href="#invoice-2041": the row is a link

at: the time

at: an ISO date-time with its zone
at: a YYYY-MM-DD day

read: the unread dot

read: (default), unread, with its dot
read="true": no dot, regular weight

archived: filed away

icon: a library icon name

icon: (default), no glyph
icon="receipt": drawn before the text

unread: the badge count

label: the bell and the heading

emptyText: when there are no items

empty-text="You are all caught up." (default)
empty-text="Nothing waiting for you"

viewAllHref: the link under the list

defaultOpen: open at first paint

now: the clock for Today and Yesterday

now="2026-10-11T14:30:00+05:30": a fixed clock

onMarkAllRead: Mark all read (read-action on Razor)

onItemClick: an item is chosen

renderItem: the row's own content

tabs: the tab strip

onTabChange: a tab is picked

onOpenChange: the panel opens or closes

linkComponent: a router link

className: the root's extra class

Guidance

What to do, and what to avoid.

Use it when

  • A portal's list of things that happened to the person: approvals, comments, runs finished.
  • Anything that links to a record.
  • A row needs its own controls, such as Accept and Decline buttons: pass renderItem(item), which returns the row's content in place of the icon, title, text and time. The dot, the Unread prefix and the read handling stay.
  • A product brands the unread count: set --wui-notification-count-bg (the fill, default the strong danger colour) and --wui-notification-count-fg (the text, default white) on .wui-notification-center or an ancestor. No prop or class override is needed.

Reach for something else when

  • A message that must be acted on right now. → AppAlert or AppToast
  • The shell's topbar bell fed by a server fragment. → AppShell notifications

Reference

Try every prop, read the full list, and check keyboard and screen reader behaviour.

Mixed days All read Empty
Succeeds Refuses None
React, generated from the controls
<AppNotificationCenter items={items} viewAllHref="#all" defaultOpen onMarkAllRead={markAllRead} />
Razor, the same props
<app-notification-center view-all-href="#all" read-action="?handler=ReadAll" open="true">…</app-notification-center>

8 props. The 4 most used come first.

Used on most screens 4 props

PropTypeDefaultDescription
unreaddefault - int - The badge count when it is larger than the items listed, for example the latest twenty of 120. Without it the count is the number of unread items.
labeldefault Notifications string Notifications The bell's name and the panel heading.
empty-textdefault You are all caught up. string You are all caught up. Shown when there are no items.
view-all-hrefdefault - string - A View all link under the list. Without it there is no link.

Less common 4 props

PropTypeDefaultDescription
read-actiondefault - string - Where Mark all read POSTs the unread ids, repeated as ids, with the antiforgery token. Without it there is no button.
opendefault false bool false Start with the panel open; the browser owns it after that.
nowdefault - string - The clock for Today and Yesterday, as ISO text or epoch milliseconds. The current time when omitted.
tabsdefault - string - true for the tabs All, Unread and Archived, or a comma list of keys in order, each optionally key:Label. Without it there is no tab strip.

8 props.

Less common 8 props

PropTypeDefaultDescription
iddefault - string - Stable id; names the notification to your script and to the server. Required.
titledefault - string - The one line that says what happened. Required.
textdefault - string - A second, quieter line.
hrefdefault - string - The record it opens. Without it the notification is a button.
atdefault - string - When it happened: an ISO date-time with its zone, or a YYYY-MM-DD day. Required.
readdefault false bool false Already read: no dot, regular weight.
icondefault - string - A library icon name, drawn before the text.
archiveddefault false bool false Filed away: shown only under the Archived tab.

Screen reader

3 notes
  • The bell is a button with aria-haspopup dialog and aria-expanded, named with the label and the unread count.
  • The panel is a dialog named by its heading; Escape closes it and returns focus to the bell.
  • A change in the unread count is announced through a polite live region, and each unread item carries a visually hidden Unread prefix.