Skip to main content
Version: 2026.04.0

Notification Center

A panel for displaying and managing in-app notifications.

Preview ยท Notification Center

Codeโ€‹

<div class="card" style="max-width:320px;padding:0">
<div style="display:flex;align-items:center;justify-content:space-between;padding:0.875rem 1rem;border-bottom:1px solid var(--border)">
<span style="font-weight:600;font-size:0.875rem">Notifications</span>
<span class="badge">3</span>
</div>
<div>
<div style="padding:0.875rem 1rem;border-bottom:1px solid var(--border);display:flex;gap:0.75rem">
<div style="width:8px;height:8px;border-radius:50%;background:var(--primary);margin-top:6px;flex-shrink:0"></div>
<div><p style="margin:0;font-size:0.875rem;font-weight:500">Acme Corp subscription renewed</p><p style="margin:0;font-size:0.75rem;color:var(--muted-foreground)">2 min ago</p></div>
</div>
<div style="padding:0.875rem 1rem;display:flex;gap:0.75rem">
<div style="width:8px;height:8px;border-radius:50%;background:var(--warning);margin-top:6px;flex-shrink:0"></div>
<div><p style="margin:0;font-size:0.875rem;font-weight:500">Rate limit warning โ€” Globex</p><p style="margin:0;font-size:0.75rem;color:var(--muted-foreground)">15 min ago</p></div>
</div>
</div>
</div>

Propsโ€‹

PropTypeDefaultDescription
notificationsNotification[]requiredList of notifications to display
onNotificationClick(n: Notification) => voidโ€”Called when a notification is clicked
onMarkAllRead() => voidโ€”Called when "Mark all read" is triggered
onClearAll() => voidโ€”Called when "Clear all" is triggered

TypeScript interfacesโ€‹

interface Notification {
id: string;
title: string;
message: string;
type: 'info' | 'success' | 'warning' | 'error';
timestamp: string; // ISO 8601
read: boolean;
action?: { label: string; href: string };
}
Version history

See the Changelog for version history and breaking changes.