NotificationCenter
organismsA bell with an unread badge that opens the notification list: a Popover on fine pointers, a bottom Drawer on touch and narrow screens; day groups, mark all read, filters, paging and a footer slot.
Approvals and alerts
items, onaction (a promise keeps the action pending), onread, onreadall, onloadmore, a footer snippet; "New notification" raises the count and wiggles the bell.
Filters and the mobile sheet
filters adds All / Unread / Needs action chips; sheet forces the bottom Drawer that sheet="auto" picks on touch and narrow screens; onvisible reports unread items as they scroll into view.
Empty centre
No items: the badge hides, Mark all read is disabled and the panel shows an EmptyState; the empty snippet replaces it.
Without the bell
bell={false} renders no trigger: bind:open opens the panel as a side Drawer (the bottom sheet on narrow screens), here from a menu row.
Clear all in the header
headerAction puts an icon action in the panel header; markAll={false} hides Mark all read, so the bulk action is a clear-all trash button.
Props
| Prop | Type | Default | Description |
|---|---|---|---|
items | NotificationData[] | [] | |
unread | number | — | Badge count; defaults to the number of unread `items`. |
loading | boolean | false | |
hasMore | boolean | false | |
open bindable | boolean | false | |
filter bindable | NotificationFilter | 'all' | |
filters | boolean | false | Show the All / Unread / Needs action chips. |
title | string | 'Notifications' | |
markAllLabel | string | 'Mark all read' | |
markAll | boolean | true | `false` hides the header's Mark all read button. |
headerAction | NotificationHeaderAction | — | An extra icon action in the header, after Mark all read. |
closeLabel | string | 'Close notifications' | |
emptyTitle | string | 'No notifications' | |
emptyDescription | string | 'You are all caught up.' | |
placement | 'bottom-start' | 'bottom-end' | 'bottom-end' | |
sheet | 'auto' | boolean | 'auto' | `auto` opens a bottom Drawer on coarse pointers and narrow screens, a Popover otherwise. |
bell | boolean | true | `false` renders no bell: `bind:open` opens the panel as a side Drawer (a bottom sheet where `sheet` applies), e.g. from a menu row. |
attention | boolean | true | Wiggle the bell when the unread count rises; skipped under reduced motion. |
chime | boolean | false | Play the `notify` sound when the unread count rises (needs sounds enabled). |
sound | boolean | true | |
onaction | (itemId: string, actionId: string) => unknown | — | May return a promise; the item's action stays pending until it settles. |
onread | (id: string) => void | — | An unread item was opened. |
onreadall | () => void | — | |
onloadmore | () => void | — | |
onopenchange | (open: boolean) => void | — | |
onvisible | (id: string) => void | — | An unread item scrolled into view while the panel is open; once per open. |
onitemopen | (id: string) => void | — | |
ondismiss | (id: string) => void | — | Shows a dismiss button on each item when set. |
footer | Snippet | — | |
empty | Snippet | — | Replaces the empty state. |
class | string | '' | |
style | string | '' |