Overview
The SDK ships a built-in in-app notification system: a snackbar that appears above the message list, channel list, and threads to surface confirmations, warnings, and errors. The components and hooks documented in this section are the building blocks of that system.
For a conceptual walkthrough of how notifications flow from stream-chat through to the snackbar, how panel targeting works, and what the SDK emits by default, see the In-App Notifications guide. For task-driven recipes, see the In-App Notifications cookbook and the Snackbar cookbook.
Components
| Component | Description |
|---|---|
NotificationList | The snackbar host. Picks the active notification for its panel and renders it above the content. |
Notification | The snackbar card itself: icon, message, optional action buttons, optional close button. |
NotificationIcon | Maps a notification's severity to an icon. Replaceable via component overrides. |
NotificationTargetContext | Declares which panel a subtree belongs to so notifications route correctly when targeting isn't inferable. |
Hooks
| Hook | Description |
|---|---|
useNotificationApi | Emit, dismiss, and target notifications. |
useNotifications | Read all notifications or read notifications for a specific target with an optional filter. |
useSystemNotifications | Read notifications tagged as system, emitted via addSystemNotification and excluded from the snackbar. |
useNotificationTarget | Resolve the current panel (channel, thread, channel-list, thread-list) from React context. |
useNotificationListController | Drive a custom NotificationList: pick the active notification, dismiss it, manage timeouts. |