Examples
With animation
Adding a notification pulses the badge icon; the animation runs once per new notification.
Documentation
Notification badge props
Parameters accepted by
{#include components/feedback/notification-badge ... /}. Model mode: pass
notificationBadge=<NotificationBadge> built in Java instead — the Java tab on
each example shows the builder.
| Name | Type | Description |
|---|---|---|
* id
|
String | DOM id. |
variant
|
read | unread | attention
|
State. Default read.
|
count
|
String | Number overlaid on the bell. Omit to show only the icon. |
ariaLabel
|
String | Accessible name (e.g. "3 unread notifications"). |
Usage
Pair with a Drawer. Click toggles a Drawer whose panel renders the Notification drawer.