Notification bell

A notifications link with an accessible unread count and update status.

Receive a demo notification in this island's recent list, or mark all its notices read.

Open in new tab

Each preview is its own Live page in a frame, because this site is a Vue 3.5 app built on the Pulsar starter kit. An open list or popover stays inside its frame; in your application it opens over the page.

Installation

bash
suprnova live:add notification-bell

Usage

html
{% import "suprnova-ui/notification-bell/notification-bell.html" as notification_bell %}
{% call notification_bell::notification_bell("notifications", "/components/notification-bell", unread) %}{% endcall %}

Keyboard and accessibility

suprnova.notification-bell - an unread count refreshed by the island's stream (FDB-005). The button links to the notifications page, so it works as a plain anchor; the count is text with an accessible name, never a dot alone. The status element follows the same rule as the live feed: the runtime announces every stream state change into it and writes data-live-stream-state on the island root, so a degraded, reconnecting or closed stream says so and only the current state reads current. Classification: stitch slot (the count belongs to the principal).

API reference

notification_bell

ParameterDefaultDescription
idRequiredThe link's unique id, also used to associate its update status.
hrefRequiredThe destination of the notifications link.
countRequiredThe server's unread count, rendered as text.
label"Notifications"The visible name of the notifications link.