Skip to main content

Notification Control Props

The NotificationControl component has a minimal API focused on flexibility.

Component Import


Props Interface


Required Props

triggerComponent

Type: React.ComponentType<{ unreadCount: number }> — Required A React component that triggers the dropdown. Receives unreadCount as a prop so you can display a badge.

onNotificationClick

Type: (notification: UnifiedAppNotification) => void — Required Callback fired when a notification is clicked. The notification is automatically marked as read.
Notification object structure:

Optional Props

notificationTemplates

Type: AppNotification.NotificationTemplates — Default: all types shown Filter which notification types to display in the dropdown.

onViewAllNotifications

Type: () => void — Default: undefined Callback for a “View all notifications” button shown in the dropdown footer. When not provided, the footer button is hidden.

theme

Type: "auto" | "light" | "dark" — Default: "auto" Only for the inline styles variant. Controls the dropdown color theme.
Uses prefers-color-scheme media query to detect system theme.
The Tailwind variant ignores this prop. Use Tailwind’s dark mode system instead (add dark class to a parent element).

Complete Example


Utility Functions


Next Steps

Customization

Customize colors, layout, and behavior

Integration Examples

See real-world examples

Installation

Installation guide

Overview

Back to overview