AI Integration Quick Reference
AI Integration Quick Reference
CometChatNotificationFeed displays a scrollable notification feed where each item is rendered as a card using @cometchat/cards-react. It handles fetching, pagination, category filtering, timestamp grouping, real-time updates, and read/delivered/engagement reporting automatically.

Where It Fits
CometChatNotificationFeed is a full-screen component. Drop it into a page or route. It manages its own data fetching, state, and real-time listeners — you just handle navigation callbacks.
Minimal Render
CometChatUIKit.init() and a user logged in.
Root CSS class: .cometchat-notification-feed
Filtering Feed Items
Control what loads using custom request builders:Filter Options
Actions and Events
Callback Props
onItemClick
Fires when a feed item card is clicked.onActionClick
Fires when an interactive element (button, link) inside a card is clicked. Theaction object contains the action type, parameters, and the element ID that triggered it.
onError
Fires when an internal error occurs (network failure, SDK exception).onBackPress
Fires when the back button in the header is clicked.Automatic Behaviors
The component handles these automatically — no manual setup needed:Custom View Slots
headerView
Replace the entire header:State Views
Styling
The component uses CSS variables from the CometChat theme system. Pass astyle prop for programmatic overrides, or use CSS classes for full control.
Style Prop
Style Properties
CSS Classes
Override styles using these CSS classes:Props
All props are optional.cardThemeMode
Theme mode for the card renderer (@cometchat/cards-react).
cardThemeOverride
Custom theme override passed to the card renderer.emptyStateView
Custom component displayed when there are no notifications.errorStateView
Custom component displayed when an error occurs.headerView
Custom component replacing the entire header.loadingStateView
Custom component displayed during the initial loading state.notificationCategoriesRequestBuilder
Custom request builder for fetching categories.notificationFeedRequestBuilder
Custom request builder for fetching feed items.onActionClick
Callback fired when an interactive element inside a card is clicked.
The
CardAction object contains:
type— Action type (e.g.,"openUrl","chatWithUser")params— Action parameters (e.g.,{ url: "..." },{ uid: "..." })elementId— ID of the element that triggered the action
onBackPress
Callback fired when the back button is pressed.onError
Callback fired when the component encounters an error.onItemClick
Callback fired when a feed item card is clicked.scrollToItemId
Deep link to a specific feed item by ID. The component scrolls to the item once loaded.showBackButton
Shows/hides the back button in the header.showFilterChips
Shows/hides the category filter chips row.showHeader
Shows/hides the entire header.style
Style customization object.title
Header title text.Additional Exports
CometChatNotificationBadge
A standalone badge component that displays the unread notification count. Uses a shared polling singleton — multiple badges share one interval and listener.Props
useNotificationUnreadCount
A React hook for tracking unread notification count. Uses a shared singleton — multiple components share one polling interval and WebSocket listener.Return Value
Options
Common Patterns
Show only unread items
Hide filter chips and header
Deep link to a specific notification
Embed in a sidebar
Add notification badge to navigation
Next Steps
Campaigns Feature
Overview of how campaigns work end-to-end
SDK Campaigns API
Low-level SDK APIs for feed items, categories, and engagement
Theming
Customize colors, fonts, and appearance
Components
Browse all prebuilt UI components