> ## Documentation Index
> Fetch the complete documentation index at: https://docs.suprsend.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Popover feed

> Add a SuprSend in-app popover notification feed to your React app using drop-in components, with bell icon, unread badge, and customisable notification UI.

For react applications you can implement InApp feed using our Drop-In components (popover, full screen and side sheet notifications) or Build your own UI using headless react hooks.

<Tip>
  **New to SuprSend?** Check out [example app](/docs/task-management-app-guide) with In-app Popover Feed and Toast Notifications.
</Tip>

## Inbox (Popover Feed)

<CodeGroup>
  ```javascript Example.jsx theme={"system"}
  import { Inbox, SuprSendProvider } from '@suprsend/react';

  function Example() {
    return (
      <SuprSendProvider>
        <Inbox pageSize={20} />
      </SuprSendProvider>
    );
  }
  ```

  ```javascript TypeDef theme={"system"}
  interface InboxProps {
    tenantId?: string; // defaults to active tenant set in SuprSendProvider, else 'default' tenant
    stores?: IStore[] | null; // pass it if you want to use multiple tabs
    host?: {
      socketHost?: string,
      apiHost?: string,
    };
    pageSize?: number; // defined page size defaults to 20, max value that can be passed is 100
    reachability?: boolean; // defaults to true. Pass false to hide the connection status dot and banner.
    pagination?: boolean; // pass false to disable pagination
    theme?: ITheme; // used to customise css styles of existing component
    themeType?: ThemeType; // dark or light
    popperPosition?: Placement; // placement of inbox popover on click of bell
    hideAvatar?: boolean;
    showUnreadCountOnTabs?: boolean;
    notificationClickHandler?: (notification: IRemoteNotification) => void; // callback executed on click of notification card
    primaryActionClickHandler?: (notification: IRemoteNotification) => void; // callback executed on click of primary action button
    secondaryActionClickHandler?: (notification: IRemoteNotification) => void; // callback executed on click of secondary action button
    bellComponent?: React.FC; // custom component for bell
    badgeComponent?: React.FC<{ count: number }>; // custom component for badge
    loaderComponent?: React.FC; // custom component for loader
    noNotificationsComponent?: React.FC; // custom component when no notifications are present
    tabBadgeComponent?: React.FC<{ count: number }>;
    notificationComponent?: React.FC<CustomNotificationCard>;  // custom notification card component
    headerRightComponent?: React.FC<{markAllRead: () => void,closeInboxPopover: () => void}>; // custom right side header component to override mark all as read etc
  }
  ```
</CodeGroup>

Note: Refer [Customising Feed](https://docs.suprsend.com/docs/customising-feed) for detailed explanation on customisation options available in feed components.

<Frame>
  <img src="https://files.readme.io/8134005a504eceaeeba615a8d9189cdc363e99a62f51be601e23177f8651c166-Screenshot_2025-01-14_at_5.50.46_PM.png" />
</Frame>

<Note>
  **Toast Notifications in @suprsend/react**

  In the `@suprsend/react` SDK, toast notification functionality is no longer included in Inbox by default. Developers who wish to use toast notifications will need to implement them separately to achieve similar functionality. This change allows for more flexibility and modularity in customizing the user experience.
</Note>

## Connection status

`Inbox` tells users whether their feed is working, so they know when new notifications may be missing. It combines three checks — the browser is online, the feed socket is live, and the feed API is reachable — into one status. The dot on the bell and beside the **Notifications** title, and the banner below the panel header, change based on that status: `ONLINE`, `CONNECTING`, `DEGRADED`, `AUTH_ERROR`, `OFFLINE` or `UNKNOWN`.

<Note>
  Connection status is on by default from `@suprsend/react` 1.3.0. After you upgrade, `Inbox` looks different: a healthy feed shows a small green dot on the bell and beside the title. Pass `reachability={false}` to restore the previous look.
</Note>

<Tabs>
  <Tab title="Online">
    <Frame>
      <img src="https://mintcdn.com/suprsend/Ppf4OusJZUZ_6n2w/images/inbox-connected.png?fit=max&auto=format&n=Ppf4OusJZUZ_6n2w&q=85&s=e67ec9e319404ccfe6ab0a515856b44f" width="280" alt="Inbox with a green connected dot on the bell and beside the panel title" data-path="images/inbox-connected.png" />
    </Frame>
  </Tab>

  <Tab title="Connecting">
    <Frame>
      <img src="https://mintcdn.com/suprsend/Ppf4OusJZUZ_6n2w/images/inbox-connecting.png?fit=max&auto=format&n=Ppf4OusJZUZ_6n2w&q=85&s=cd07931c0be0907fe4879383a62ebca9" width="280" alt="Inbox with a spinner dot and 'Connecting…' banner" data-path="images/inbox-connecting.png" />
    </Frame>
  </Tab>

  <Tab title="Connection issue">
    | Default banner | After **Report an issue** | Report limit reached |
    | - | - | - |
    | <img src="https://mintcdn.com/suprsend/Ppf4OusJZUZ_6n2w/images/inbox-connection-issue.png?fit=max&auto=format&n=Ppf4OusJZUZ_6n2w&q=85&s=9e33c2316b4fa1362c6652fc1a5f9d98" width="220" alt="Inbox with amber dot and connection issue banner" data-path="images/inbox-connection-issue.png" /> | <img src="https://mintcdn.com/suprsend/Ppf4OusJZUZ_6n2w/images/inbox-issue-reported.png?fit=max&auto=format&n=Ppf4OusJZUZ_6n2w&q=85&s=02c004ba13386b8e04407addae4225b1" width="220" alt="Inbox banner showing 'Issue reported'" data-path="images/inbox-issue-reported.png" /> | <img src="https://mintcdn.com/suprsend/Ppf4OusJZUZ_6n2w/images/inbox-report-limit-reached.png?fit=max&auto=format&n=Ppf4OusJZUZ_6n2w&q=85&s=9dfb79d1eba5e2946deb2f08a34144d7" width="220" alt="Inbox banner showing 'Report limit exceeded'" data-path="images/inbox-report-limit-reached.png" /> |
  </Tab>

  <Tab title="Authentication error">
    <Frame>
      <img src="https://mintcdn.com/suprsend/Ppf4OusJZUZ_6n2w/images/inbox-auth-error.png?fit=max&auto=format&n=Ppf4OusJZUZ_6n2w&q=85&s=5c6ba7c0974e395d1cf84991738c22bb" width="280" alt="Inbox with amber authentication error dot and banner" data-path="images/inbox-auth-error.png" />
    </Frame>
  </Tab>

  <Tab title="Offline">
    <Frame>
      <img src="https://mintcdn.com/suprsend/Ppf4OusJZUZ_6n2w/images/inbox-offline.png?fit=max&auto=format&n=Ppf4OusJZUZ_6n2w&q=85&s=8b4a840aba13861bd59049aa0639c4fb" width="280" alt="Inbox with hollow grey dot and 'You're offline' banner" data-path="images/inbox-offline.png" />
    </Frame>
  </Tab>
</Tabs>

| Feed status | Dot | Banner |
| - | - | - |
| `ONLINE` | Green | None |
| `CONNECTING` | Spinner | "Connecting…" |
| `DEGRADED` | Amber | "There seems to be a connection issue. New notifications may get delayed or missed.", with **Refresh the page** and **Report an issue** |
| `AUTH_ERROR` | Amber | "Not able to fetch notifications due to authentication or permission issue." No actions. |
| `OFFLINE` | Hollow grey | "You're offline. Reload the page to update notifications when your connection is back." The built-in **Mark all as read** button is disabled. |
| `UNKNOWN` | None | None |

For how each status is decided, see [Tracking reachability](/docs/js-inapp-feed#tracking-reachability).

If you pass your own `headerRightComponent`, it isn't disabled when the user is offline.

### Refresh the page and Report an issue

These two actions appear only on the connection issue banner (`DEGRADED`):

* **Refresh the page** reloads the page.
* **Report an issue** sends the last API and socket error to SuprSend. The banner then shows "Issue reported". If the user has sent too many reports, it shows "Report limit exceeded. Try later." If the report can't be sent for any other reason, the browser opens an email draft to [support@suprsend.com](mailto:support@suprsend.com) with the user's distinct ID, tenant ID and error details.

The user can report again after the issue clears.

### Turn off connection status

```jsx theme={"system"}
<Inbox reachability={false} />
```

To change the dot and banner colours, see [Customising CSS styles](/docs/react-customising-feed#customising-css-styles). To change the banner text or translate it, see [Internationalization](/docs/react-language-support).


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.