Notification Control Props
TheNotificationControl component has a minimal API focused on flexibility and ease of use.
Component Import
Props Interface
Required Props
triggerComponent
Type: React.ComponentType<{ unreadCount: number }>
Required: Yes
A React component that triggers the dropdown. Receives unreadCount as a prop.
- Simple Icon
- With Badge
- With Animation
onNotificationClick
Type: (notification: UnifiedAppNotification) => void
Required: Yes
Callback fired when a notification is clicked. Notification is automatically marked as read.
Optional Props
notificationTemplates
Type: AppNotification.NotificationTemplates
Default: All notification types enabled
Filter which notification types to display.
onViewAllNotifications
Type: () => void
Default: undefined (footer button hidden)
Callback for “View all notifications” button in footer. When provided, a footer button appears.
theme
Type: "auto" | "light" | "dark"
Default: "auto"
Only for styled (inline styles) variant.
Controls the color theme of the dropdown.
- auto
- light
- dark
Uses
prefers-color-scheme media query to detect system theme.Tailwind variant ignores this prop. Use Tailwind’s dark mode system instead (add
dark class to parent element).Complete Examples
Minimal Usage
With All Features
Utility Functions
The component includes utility functions you can use:TypeScript Support
Full TypeScript support with exported types:Next Steps
Customization
Customize colors, layout, and behavior
Integration Examples
See real-world examples
Installation
Installation guide
Overview
Back to overview

