Use the source below in your application. Try the interactive component in Playground or Examples.
import '@blukavantui/community/theme.css'
import {createNotificationCenter} from '@blukavantui/community/notification-center';
import '@blukavantui/community/notification-center.css';
export function mount(host:HTMLElement) {
const status=document.createElement("p");status.setAttribute("role","status");
const component=createNotificationCenter(host, {
"Items": [
{
"Key": "approval",
"Title": "Purchase order needs approval",
"Description": "Jordan submitted PO-1042 for your review.",
"Category": "Approvals",
"Timestamp": "2026-10-12T14:20:00Z",
"Color": "Warning",
"IsRead": false,
"IsArchived": false,
"ActionLabel": "Review request"
},
{
"Key": "import",
"Title": "Customer import completed",
"Description": "248 customer records are ready to use.",
"Category": "Data",
"Timestamp": "2026-10-12T13:40:00Z",
"Color": "Success",
"IsRead": false,
"IsArchived": false,
"ActionLabel": "View records"
},
{
"Key": "mention",
"Title": "You were mentioned in a comment",
"Description": "Alex: Can you check the updated inspection plan?",
"Category": "Team",
"Timestamp": "2026-10-12T12:10:00Z",
"Color": "Primary",
"IsRead": true,
"IsArchived": false,
"ActionLabel": "Open comment"
},
{
"Key": "export",
"Title": "Your export is ready",
"Description": "The weekly report has been generated.",
"Category": "Data",
"Timestamp": "2026-10-11T19:30:00Z",
"Color": "Cyan",
"IsRead": true,
"IsArchived": true,
"ActionLabel": "View export"
}
],
"DisplayMode": "Inline",
"IsOpen": false,
"IsLoading": false,
"IsDisabled": false,
"Title": "Your inbox"
}, { ItemsChanged: (items, key, reason) => {
// Persist per-user inbox state through your application's API.
status.textContent = `${reason}: ${key || 'all notifications'}`;
}, Action: key => { status.textContent = `Application action requested: ${key}`; } });
host.append(status);
return {destroy(){component.destroy();status.remove();}};
}
const instance = mount(document.getElementById('example')!)
// When this page or framework component is removed:
// instance.destroy()